Send a reply to a conversation
POST/api/partner-gateway/inbox/conversations/reply
Sends a reply in an existing conversation, on the channel the conversation runs on: you do not choose the channel.
- Body:
chatIdand a non-blankmessage, at least one attachment, or both. - Attachments: every
attachments[].mediaIdmust be a media item of your own library (see the Media endpoints). 202means accepted and queued for delivery. The reply is handed on for delivery before the response is sent, so a refusal at that point comes back at once as400or502. Track the delivery with the delivery-status webhook, if you have configured one.- Reply window: some channels accept replies only within a time window, such as the 24 hours of WhatsApp. A reply sent outside it may fail to be delivered.
replyTois the message of the conversation you reply to. On a WhatsApp reply that carries text it must be a message of this conversation; a reply with attachments only ignores it.
On WhatsApp a
502can arrive after part of the reply was sent. The text and each attachment go out as separate messages, text first, so a retry sends that part again. On Instagram, Facebook Messenger and chatbot conversations a502means nothing was sent, and the request can be retried.
Maximum text length on each channel
| Channel | Characters |
|---|---|
| 4096 | |
| RCS | 3072 |
| Facebook Messenger | 2000 |
| 1000 |
Request
Responses
- 202
- 400
- 401
- 404
- 502
Reply accepted and queued for delivery. No response body.
The body is malformed or misses a required field, the reply is empty, the text is longer than the channel accepts, an attachment has a type or size the channel does not accept, or RCS refuses the message. Apart from the checks on the body itself, the response does not say which cause applies.
The API key is missing, invalid, or lacks the INBOX operation.
The conversation does not exist in your account, an attachment is not a media item of your library, or, on a WhatsApp reply that carries text, replyTo is not a message of this conversation.
An attachment could not be read from the media library, or the channel did not accept the reply. On WhatsApp part of the reply may already have been sent.