Enviar lote de mensagens
Changed onEnvia o mesmo template para até 1.000 destinatários em uma chamada. Para mais que isso, use Campanhas.
O lote é tudo ou nada: um telefone inválido ou saldo insuficiente recusa o lote inteiro com 422 UNPROCESSABLE_ENTITY.
Com Idempotency-Key, repetir a chamada devolve o lote original sem reenviar. Acompanhe o lote em GET /v1/messages?batchId=.
Permissão: MESSAGES_SEND.
Request
- Base URLhttps://api.ararahq.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Chave de idempotência, de 1 a 255 caracteres, sem caracteres de controle (fora disso: 400 INVALID_IDEMPOTENCY_KEY). Derive de um evento do seu sistema (id do pedido, id da tentativa) e reuse a mesma chave nas retentativas.
Request body
Example request
{
"messages": [
{
"receiver": "+5511999999999"
}
]
}Response
Lote aceito
Example response
{
"batchId": "ara_msg_b7C1d2E",
"templateName": "pedido_confirmado",
"total": 2,
"accepted": 2,
"totalCost": 0.136,
"messages": [
{
"id": "ara_msg_a1B2c3D",
"receiver": "whatsapp:+5511999999999",
"status": "PENDING",
"cost": 0.068
},
{
"id": "ara_msg_e4F5g6H",
"receiver": "whatsapp:+5511888888888",
"status": "PENDING",
"cost": 0.068
}
]
}Changes
- info
api tag
Mensagensadded - info
api tag
messagesremoved - info
added the non-success response with the status
- info
removed the non-success response with the status
- info
- breaking
the
request property's minItems was increased to1 - breaking
the response property
/became nullable for the status - breaking
the response property
/became nullable for the status - breaking
the response property
/became nullable for the status - breaking
the response property
became optional for the status - breaking
the
response's property type changed fromobjecttostringfor status - breaking
the
//response's property format changed fromfloatto no format for status - breaking
the
response's property format changed fromfloatto no format for status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - warning
removed the optional property
/from the response with the status - info
added the new optional
headerrequest parameterIdempotency-Key - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- breaking