Send a visitor message
Visitor message: it enters the inbox like any channel (the first one opens the ticket in the webchat queue). Text as JSON (text) or a file as multipart (media, up to 10 MB; image, audio, video, PDF, DOCX, XLSX or ZIP). Use Idempotency-Key to avoid duplicates on retry.
Reply to an interactive message: interactiveReply with the message id and the id of the chosen option (from options or from interactive). The saved title comes from the message itself, as on WhatsApp: the reply reaches the ticket and the automation as text (the option title), quoting the interactive message. Location request: location with latitude and longitude, saved like a WhatsApp location. With interactiveReply or location, text is ignored.
Missing required data: 422 ERR_WEBCHAT_VISITOR_DATA_REQUIRED, with the fields in message (e.g. name,phone). Option that is not in the message (or a message the visitor cannot see): 422 ERR_WEBCHAT_INTERACTIVE_REPLY_INVALID. Invalid coordinate: 422 ERR_WEBCHAT_LOCATION_INVALID. Closed session: 410.
curl --request POST \
--url https://api.connectadesk.com/api/v1/webchat/{slug}/sessions/{sessionId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Olá, gostaria de um orçamento"
}
'{
"data": {
"message": {
"id": "6f1d2c1e-8a8b-4f35-a1e6-1f2f3c4d5e6f",
"body": "Olá, gostaria de um orçamento",
"fromVisitor": true,
"origin": "visitor",
"agentName": null,
"ack": 1,
"mediaUrl": null,
"mediaType": null,
"fileName": null,
"options": [],
"interactive": {
"type": "button",
"header": null,
"body": "Como prefere pagar?",
"footer": null,
"buttons": [
{
"id": "pix",
"title": "Pix"
},
{
"id": "cartao",
"title": "Cartão"
}
]
},
"location": null,
"quoted": null,
"isDeleted": false,
"isEdited": false,
"createdAt": "2026-10-01T13:45:00.000Z"
},
"ticketId": 123
}
}{
"error": {
"code": "ERR_API_UNAUTHORIZED",
"message": "Token de API ausente ou inválido."
}
}{
"error": {
"code": "ERR_API_FORBIDDEN_SCOPE",
"message": "O token não tem permissão para este método neste módulo. A mensagem real nomeia os dois."
}
}{
"error": {
"code": "ERR_API_NOT_FOUND",
"message": "Registro não encontrado."
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O parâmetro `application` é obrigatório e aceita \"contact\" ou \"card\"."
}
}Authorizations
API token in the sk_live_… format.
Body
4096Conversation message this one replies to (quoted). A message the visitor cannot see is ignored.
Choice in an interactive message from the company.
Show child attributes
Show child attributes
Visitor location (reply to a location request).
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
curl --request POST \
--url https://api.connectadesk.com/api/v1/webchat/{slug}/sessions/{sessionId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Olá, gostaria de um orçamento"
}
'{
"data": {
"message": {
"id": "6f1d2c1e-8a8b-4f35-a1e6-1f2f3c4d5e6f",
"body": "Olá, gostaria de um orçamento",
"fromVisitor": true,
"origin": "visitor",
"agentName": null,
"ack": 1,
"mediaUrl": null,
"mediaType": null,
"fileName": null,
"options": [],
"interactive": {
"type": "button",
"header": null,
"body": "Como prefere pagar?",
"footer": null,
"buttons": [
{
"id": "pix",
"title": "Pix"
},
{
"id": "cartao",
"title": "Cartão"
}
]
},
"location": null,
"quoted": null,
"isDeleted": false,
"isEdited": false,
"createdAt": "2026-10-01T13:45:00.000Z"
},
"ticketId": 123
}
}{
"error": {
"code": "ERR_API_UNAUTHORIZED",
"message": "Token de API ausente ou inválido."
}
}{
"error": {
"code": "ERR_API_FORBIDDEN_SCOPE",
"message": "O token não tem permissão para este método neste módulo. A mensagem real nomeia os dois."
}
}{
"error": {
"code": "ERR_API_NOT_FOUND",
"message": "Registro não encontrado."
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O parâmetro `application` é obrigatório e aceita \"contact\" ou \"card\"."
}
}
