POST /v1/automations/test-send
POST
/v1/automations/test-send
const url = 'https://seu-endereco-da-api/v1/automations/test-send';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"channelId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","contactId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","departmentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","message":{"kind":"template","templateId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","templateVariables":["example"],"headerMediaKey":"example","headerMediaMime":"example","text":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://seu-endereco-da-api/v1/automations/test-send \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "channelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "contactId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "departmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "message": { "kind": "template", "templateId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "templateVariables": [ "example" ], "headerMediaKey": "example", "headerMediaMime": "example", "text": "example" } }'Permissão que a Chave de acesso precisa: Gerenciar disparos automáticos (automations:manage).
Authorizations
Seção intitulada “Authorizations”Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
channelId
required
string format: uuid
contactId
required
string format: uuid
departmentId
required
string format: uuid
message
required
object
kind
required
string
templateId
string format: uuid
templateVariables
Array<string>
headerMediaKey
string
headerMediaMime
string
text
string
Responses
Seção intitulada “Responses”Media typeapplication/json
object
conversationId
required
string format: uuid
Example generated
{ "conversationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}