curl --request POST \
--url https://api.blu.direct/v1/chats/{chat}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "text",
"text": {
"body": "Olá! Seu pedido saiu para entrega."
}
}
'{
"type": "text",
"text": {
"body": "<string>",
"preview_url": false
},
"id": "msg_Zt4b",
"object": "message",
"chat": "<string>",
"direction": "inbound",
"status": "accepted",
"errors": [
{
"code": "not_on_whatsapp",
"message": "<string>"
}
],
"context": {
"message_id": "<string>"
},
"from": {
"wa_id": "5511988887777",
"name": "<string>"
},
"mentions": [
"<string>"
],
"broadcast": "<string>",
"pricing": {
"billable": true,
"category": "marketing"
},
"whatsapp_message_id": "<string>",
"created": 1760190012
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"request_id": "<string>",
"code": "outside_service_window",
"param": "text.body",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"request_id": "<string>",
"code": "outside_service_window",
"param": "text.body",
"doc_url": "<string>"
}
}Mensagens
Enviar uma mensagem
Envia uma mensagem na conversa. O corpo segue a API do WhatsApp Cloud:
defina type e o objeto de mesmo nome.
A mensagem é devolvida com status accepted e passa por sent,
delivered e read, informados pelos eventos message.updated.
Mensagens livres só podem ser enviadas até 24
horas depois da última mensagem do contato (service_window_expires_at
na conversa). Fora desse prazo, envie type: template ou a requisição
falha com outside_service_window.
POST
/
v1
/
chats
/
{chat}
/
messages
curl --request POST \
--url https://api.blu.direct/v1/chats/{chat}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "text",
"text": {
"body": "Olá! Seu pedido saiu para entrega."
}
}
'{
"type": "text",
"text": {
"body": "<string>",
"preview_url": false
},
"id": "msg_Zt4b",
"object": "message",
"chat": "<string>",
"direction": "inbound",
"status": "accepted",
"errors": [
{
"code": "not_on_whatsapp",
"message": "<string>"
}
],
"context": {
"message_id": "<string>"
},
"from": {
"wa_id": "5511988887777",
"name": "<string>"
},
"mentions": [
"<string>"
],
"broadcast": "<string>",
"pricing": {
"billable": true,
"category": "marketing"
},
"whatsapp_message_id": "<string>",
"created": 1760190012
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"request_id": "<string>",
"code": "outside_service_window",
"param": "text.body",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"request_id": "<string>",
"code": "outside_service_window",
"param": "text.body",
"doc_url": "<string>"
}
}Autorizações
Corpo
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
O conteúdo da mensagem. type indica o objeto que guarda o conteúdo, como na API do WhatsApp Cloud.
Resposta
A mensagem aceita.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
O conteúdo da mensagem. type indica o objeto que guarda o conteúdo, como na API do WhatsApp Cloud.