Mensagens

Enviar

post

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

Autorizações
Corpo
fromstring | nuloOpcional

Número de telefone do canal cadastrado na conta.

tostring · mín: 1Obrigatório

Número de telefone do destinatário.

botIdstring · uuid | nuloOpcional

ID do bot que será ativado após a resposta do contato.

Respostas
200

Success

application/json
post
/v1/message/send
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"
}

Enviar síncrono

post

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;

Autorizações
Corpo
fromstring | nuloOpcional

Número de telefone do canal cadastrado na conta.

tostring · mín: 1Obrigatório

Número de telefone do destinatário.

botIdstring · uuid | nuloOpcional

ID do bot que será ativado após a resposta do contato.

Respostas
200

Success

application/json
post
/v1/message/send-sync
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"
  ]
}

Obter por ID

get
Autorizações
Parâmetros de rota
idstring · uuidObrigatório

ID da mensagem.

Respostas
200

Success

application/json
get
/v1/message/{id}
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"
  ]
}

Excluir mensagem

delete
Autorizações
Parâmetros de rota
idstring · uuidObrigatório

ID da mensagem a ser excluída.

Respostas
200

Success

application/json
delete
/v1/message/{id}
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"
  ]
}

Obter status por ID

get
Autorizações
Parâmetros de rota
idstring · uuidObrigatório

ID da mensagem.

Respostas
200

Success

application/json
get
/v1/message/{id}/status
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"
}

Listar

get

Listagem paginada de mensagens por ID de uma conversa.

Autorizações
Parâmetros de consulta
SessionIdstring · uuidObrigatório

ID da conversa.

CreatedAt.Beforestring · date-timeOpcional

Limite superior de busca, sempre em fuso horário UTM.

CreatedAt.Afterstring · date-timeOpcional

Limite inferior de busca, sempre em fuso horário UTM.

UpdatedAt.Beforestring · date-timeOpcional

Limite superior de busca, sempre em fuso horário UTM.

UpdatedAt.Afterstring · date-timeOpcional

Limite inferior de busca, sempre em fuso horário UTM.

PageNumberinteger · int32 · máx: 2147483647Opcional

Número da página a ser obtida.

Default: 1
PageSizeinteger · int32 · mín: 1 · máx: 100Opcional

Tamanho da página a ser obtida.

Default: 15
OrderBystringOpcional

Nome do campo para ser utilizado como pivô da ordenação.

OrderDirectionstring · enumOpcional

Determina se a ordenação deve ser crescente ou decrescente.

Valores possíveis:
Respostas
200

Success

application/json
get
/v1/message
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