Send document
POST
/api/v1/messages/documentSends a file (PDF, spreadsheet, contract) with the name the recipient sees in the conversation.
The API key needs the scopeSend messages
messages.sendRequest body
| Field | Description |
|---|---|
wabaPhoneNumberIdrequiredstring | The company number that sends: its id in Guria or Meta's phone_number_id. |
jidrequiredstring | The recipient: a WhatsApp number with country and area code, digits only. |
correlationIdstring | An identifier of yours for this send, returned with the message. With it the send counts as automated; without it, as sent by an agent, and the conversation's AI agent is paused. |
replyToMessageIdstring | Id of the message this one replies to, so it goes out as a quoted reply. |
mediaUrlrequiredstring | Public address of the file. |
captionstring | Text that goes with the document. |
fileNamestring | File name, as the recipient sees it in the conversation. |
Responses
200The message accepted for sending.
application/json
{
"id": "9e4b7c2a-6d1f-4a3e-8b5c-0f7d2a9e6c41",
"businessId": "2ea7ad0d-8e13-4008-9fd8-7c92fe8677f2",
"conversationId": "3c8e1a5d-7b2f-4d6a-9e0c-5a1f8b3d7e29",
"phoneNumberId": "5f0c2a1e-7d4b-4c8a-9e21-3b6d8f0a4c57",
"contactId": "af147888-ebb0-4ec9-92e5-da66cd561461",
"wabaMessageId": null,
"provider": "MetaWaba",
"direction": "Outbound",
"type": "Text",
"status": "Pending",
"mediaUrl": null,
"text": "Oi, Fulano! Seu pedido saiu para entrega e chega hoje até as 18h.",
"caption": null,
"fileName": null,
"replyToWabaMessageId": null,
"correlationId": "pedido-48213",
"createdAt": "2026-11-25T17:40:03.511902Z",
"sentAt": null,
"deliveredAt": null,
"readAt": null,
"errorCode": null,
"errorMessage": null
}400Invalid request: a body that is not JSON, a missing required field or a value in the wrong format.
application/json
{
"error": "validation_failed",
"message": "O campo name é obrigatório."
}401Missing or invalid credentials. The response is the same for a key that does not exist and for a wrong secret; without the X-API-KEY header, it comes with no body.
application/json
{
"error": "unauthorized",
"message": "Credenciais de API inválidas."
}403The key authenticated, but it lacks the scope the route requires, or the plan does not include the feature.
application/json
{
"error": "forbidden",
"message": "A chave de API não tem acesso a esta rota: falta o escopo exigido, ou a rota não aceita chave de API."
}409The current state of the record or of the channel prevents the operation. The error field carries the exact reason.
application/json
{
"error": "conflict",
"message": "A operação entra em conflito com o estado atual do registro."
}429The requests-per-minute limit was reached. Wait for the time given in the Retry-After header.
application/json
{
"error": "too_many_requests",
"message": "Muitas requisições com esta chave de API. Aguarde o fim da janela e tente novamente."
}