Mensagens
Este endpoint segue as mesmas regras do canal de atendimento, por exemplo: uma conversa só pode ser iniciada no WhatsApp utilizando um modelo de mensagem. Caso o contato não esteja cadastrado, ele será cadastrado automaticamente antes do envio. O envio da mensagem será assincrono, ao enviar a mensagem será salva em uma fila de disparo, e será processada posteriormente. Para verificar a situação do envio, consulte pelo endereço /chat/v1/message/{id}/status
Número de telefone do canal cadastrado na conta.
Número de telefone do destinatário.
ID do bot que será ativado após a resposta do contato.
Success
Server Error
POST /chat/v1/message/send HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 514
{
"from": "text",
"to": "text",
"botId": "123e4567-e89b-12d3-a456-426614174000",
"body": {
"text": "text",
"templateId": "text",
"parameters": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"fileUrl": "text",
"fileId": "123e4567-e89b-12d3-a456-426614174000",
"refId": "123e4567-e89b-12d3-a456-426614174000"
},
"department": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
},
"user": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"phoneNumber": "text",
"email": "text"
},
"options": {
"enableBot": true,
"hiddenSession": true,
"forceStartSession": true
}
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"senderId": "text",
"status": "PROCESSING",
"statusUrl": "text"
}Este endpoint segue as mesmas regras do canal de atendimento, por exemplo: uma conversa só pode ser iniciada no WhatsApp utilizando um modelo de mensagem. Caso o contato não esteja cadastrado, ele será cadastrado automaticamente antes do envio. O envio da mensagem será síncrono, então ele pode demorar um tempo até que o servidor do canal de atencimento responda com um status válido para a mensagem. O tempo máximo que este metodo esperará uma resposta é de 25 segundos, após este tempo ele entregará a última situação da mensagem;
Número de telefone do canal cadastrado na conta.
Número de telefone do destinatário.
ID do bot que será ativado após a resposta do contato.
Success
Server Error
POST /chat/v1/message/send-sync HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 514
{
"from": "text",
"to": "text",
"botId": "123e4567-e89b-12d3-a456-426614174000",
"body": {
"text": "text",
"templateId": "text",
"parameters": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"fileUrl": "text",
"fileId": "123e4567-e89b-12d3-a456-426614174000",
"refId": "123e4567-e89b-12d3-a456-426614174000"
},
"department": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
},
"user": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"phoneNumber": "text",
"email": "text"
},
"options": {
"enableBot": true,
"hiddenSession": true,
"forceStartSession": true
}
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"updatedAt": "2025-11-06T22:29:59.736Z",
"timestamp": "2025-11-06T22:29:59.736Z",
"type": "TEXT",
"senderId": "text",
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"templateId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"direction": "FROM_HUB",
"status": "PROCESSING",
"origin": "DEFAULT",
"text": "text",
"fileId": "123e4567-e89b-12d3-a456-426614174000",
"refId": "123e4567-e89b-12d3-a456-426614174000",
"readContactAt": "2025-11-06T22:29:59.736Z",
"details": {
"file": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
},
"files": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
}
],
"fileAsLink": {
"file": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
},
"shortUrl": "text"
},
"location": {
"latitude": 1,
"longitude": 1,
"address": "text",
"name": "text",
"url": "text"
},
"contact": {
"name": "text",
"email": "text",
"phoneNumber": "text",
"phoneNumberFormatted": "text"
},
"errors": [
{
"date": "2025-11-06T22:29:59.736Z",
"origin": "text",
"key": "text",
"text": "text"
}
],
"footerText": "text",
"utm": {
"sourceId": "text",
"source": "text",
"clid": "text",
"medium": "text",
"campaign": "text",
"content": "text",
"headline": "text",
"term": "text",
"referralUrl": "text"
},
"payTransactionId": "123e4567-e89b-12d3-a456-426614174000",
"reactionToContact": "SMILE",
"reactionFromContact": "text",
"track": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"type": "ACCESS_PAGE",
"pageTitle": "text",
"pageUrl": "text",
"pageUtm": {
"sourceId": "text",
"source": "text",
"clid": "text",
"medium": "text",
"campaign": "text",
"content": "text",
"headline": "text",
"term": "text",
"referralUrl": "text"
},
"isMobileDevice": true,
"formData": {
"name": "text",
"email": "text",
"phoneNumber": "text",
"annotation": "text"
}
},
"transcription": {
"text": "text",
"processing": true,
"error": true
},
"templateCategoryId": "123e4567-e89b-12d3-a456-426614174000",
"templateCategoryName": "text"
},
"failedReason": "text",
"filesIds": [
"123e4567-e89b-12d3-a456-426614174000"
]
}ID da mensagem.
Success
Server Error
GET /chat/v1/message/{id} HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"updatedAt": "2025-11-06T22:29:59.736Z",
"timestamp": "2025-11-06T22:29:59.736Z",
"type": "TEXT",
"senderId": "text",
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"templateId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"direction": "FROM_HUB",
"status": "PROCESSING",
"origin": "DEFAULT",
"text": "text",
"fileId": "123e4567-e89b-12d3-a456-426614174000",
"refId": "123e4567-e89b-12d3-a456-426614174000",
"readContactAt": "2025-11-06T22:29:59.736Z",
"details": {
"file": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
},
"files": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
}
],
"fileAsLink": {
"file": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
},
"shortUrl": "text"
},
"location": {
"latitude": 1,
"longitude": 1,
"address": "text",
"name": "text",
"url": "text"
},
"contact": {
"name": "text",
"email": "text",
"phoneNumber": "text",
"phoneNumberFormatted": "text"
},
"errors": [
{
"date": "2025-11-06T22:29:59.736Z",
"origin": "text",
"key": "text",
"text": "text"
}
],
"footerText": "text",
"utm": {
"sourceId": "text",
"source": "text",
"clid": "text",
"medium": "text",
"campaign": "text",
"content": "text",
"headline": "text",
"term": "text",
"referralUrl": "text"
},
"payTransactionId": "123e4567-e89b-12d3-a456-426614174000",
"reactionToContact": "SMILE",
"reactionFromContact": "text",
"track": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"type": "ACCESS_PAGE",
"pageTitle": "text",
"pageUrl": "text",
"pageUtm": {
"sourceId": "text",
"source": "text",
"clid": "text",
"medium": "text",
"campaign": "text",
"content": "text",
"headline": "text",
"term": "text",
"referralUrl": "text"
},
"isMobileDevice": true,
"formData": {
"name": "text",
"email": "text",
"phoneNumber": "text",
"annotation": "text"
}
},
"transcription": {
"text": "text",
"processing": true,
"error": true
},
"templateCategoryId": "123e4567-e89b-12d3-a456-426614174000",
"templateCategoryName": "text"
},
"failedReason": "text",
"filesIds": [
"123e4567-e89b-12d3-a456-426614174000"
]
}ID da mensagem a ser excluída.
Success
Server Error
DELETE /chat/v1/message/{id} HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"updatedAt": "2025-11-06T22:29:59.736Z",
"timestamp": "2025-11-06T22:29:59.736Z",
"type": "TEXT",
"senderId": "text",
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"templateId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"direction": "FROM_HUB",
"status": "PROCESSING",
"origin": "DEFAULT",
"text": "text",
"fileId": "123e4567-e89b-12d3-a456-426614174000",
"refId": "123e4567-e89b-12d3-a456-426614174000",
"readContactAt": "2025-11-06T22:29:59.736Z",
"details": {
"file": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
},
"files": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
}
],
"fileAsLink": {
"file": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
},
"shortUrl": "text"
},
"location": {
"latitude": 1,
"longitude": 1,
"address": "text",
"name": "text",
"url": "text"
},
"contact": {
"name": "text",
"email": "text",
"phoneNumber": "text",
"phoneNumberFormatted": "text"
},
"errors": [
{
"date": "2025-11-06T22:29:59.736Z",
"origin": "text",
"key": "text",
"text": "text"
}
],
"footerText": "text",
"utm": {
"sourceId": "text",
"source": "text",
"clid": "text",
"medium": "text",
"campaign": "text",
"content": "text",
"headline": "text",
"term": "text",
"referralUrl": "text"
},
"payTransactionId": "123e4567-e89b-12d3-a456-426614174000",
"reactionToContact": "SMILE",
"reactionFromContact": "text",
"track": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"type": "ACCESS_PAGE",
"pageTitle": "text",
"pageUrl": "text",
"pageUtm": {
"sourceId": "text",
"source": "text",
"clid": "text",
"medium": "text",
"campaign": "text",
"content": "text",
"headline": "text",
"term": "text",
"referralUrl": "text"
},
"isMobileDevice": true,
"formData": {
"name": "text",
"email": "text",
"phoneNumber": "text",
"annotation": "text"
}
},
"transcription": {
"text": "text",
"processing": true,
"error": true
},
"templateCategoryId": "123e4567-e89b-12d3-a456-426614174000",
"templateCategoryName": "text"
},
"failedReason": "text",
"filesIds": [
"123e4567-e89b-12d3-a456-426614174000"
]
}ID da mensagem.
Success
Server Error
GET /chat/v1/message/{id}/status HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"status": "PROCESSING",
"failureReason": "text"
}Listagem paginada de mensagens por ID de uma conversa.
ID da conversa.
Limite superior de busca, sempre em fuso horário UTM.
Limite inferior de busca, sempre em fuso horário UTM.
Limite superior de busca, sempre em fuso horário UTM.
Limite inferior de busca, sempre em fuso horário UTM.
Número da página a ser obtida.
1Tamanho da página a ser obtida.
15Nome do campo para ser utilizado como pivô da ordenação.
Determina se a ordenação deve ser crescente ou decrescente.
Success
Server Error
GET /chat/v1/message?SessionId=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: api.wts.chat
Authorization: YOUR_API_KEY
Accept: */*
{
"pageNumber": 1,
"pageSize": 15,
"orderBy": "text",
"orderDirection": "ASCENDING",
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"updatedAt": "2025-11-06T22:29:59.736Z",
"timestamp": "2025-11-06T22:29:59.736Z",
"type": "TEXT",
"senderId": "text",
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"templateId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"direction": "FROM_HUB",
"status": "PROCESSING",
"origin": "DEFAULT",
"text": "text",
"fileId": "123e4567-e89b-12d3-a456-426614174000",
"refId": "123e4567-e89b-12d3-a456-426614174000",
"readContactAt": "2025-11-06T22:29:59.736Z",
"details": {
"file": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
},
"files": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
}
],
"fileAsLink": {
"file": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"extension": "text",
"mimeType": "text",
"type": "UNDEFINED",
"publicUrl": "text",
"publicUrlDownload": "text",
"size": 1,
"isThumbnail": true,
"thumbnail": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"publicUrl": "text"
}
},
"shortUrl": "text"
},
"location": {
"latitude": 1,
"longitude": 1,
"address": "text",
"name": "text",
"url": "text"
},
"contact": {
"name": "text",
"email": "text",
"phoneNumber": "text",
"phoneNumberFormatted": "text"
},
"errors": [
{
"date": "2025-11-06T22:29:59.736Z",
"origin": "text",
"key": "text",
"text": "text"
}
],
"footerText": "text",
"utm": {
"sourceId": "text",
"source": "text",
"clid": "text",
"medium": "text",
"campaign": "text",
"content": "text",
"headline": "text",
"term": "text",
"referralUrl": "text"
},
"payTransactionId": "123e4567-e89b-12d3-a456-426614174000",
"reactionToContact": "SMILE",
"reactionFromContact": "text",
"track": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-11-06T22:29:59.736Z",
"type": "ACCESS_PAGE",
"pageTitle": "text",
"pageUrl": "text",
"pageUtm": {
"sourceId": "text",
"source": "text",
"clid": "text",
"medium": "text",
"campaign": "text",
"content": "text",
"headline": "text",
"term": "text",
"referralUrl": "text"
},
"isMobileDevice": true,
"formData": {
"name": "text",
"email": "text",
"phoneNumber": "text",
"annotation": "text"
}
},
"transcription": {
"text": "text",
"processing": true,
"error": true
},
"templateCategoryId": "123e4567-e89b-12d3-a456-426614174000",
"templateCategoryName": "text"
},
"failedReason": "text",
"filesIds": [
"123e4567-e89b-12d3-a456-426614174000"
]
}
],
"totalItems": 1,
"totalPages": 1,
"hasMorePages": true
}Atualizado