Reply to a message

Sends a reply to the guest as the host.

Replying marks the conversation read. A host who has answered has by definition read what they were answering, so there is no separate mark-as-read call: after a successful reply, unreadMessages on that conversation is 0.

Hosts reply to conversations a guest started. Starting one is not something this API does.


POST /v2/messaging/conversations/{conversationId}/messages
Idempotency-Key: 7c9e6679-7425-40de-944b-e07fc1f90ae7
Content-Type: application/json
{ "body": "On its way — thanks for your patience." }

Request

ConversationId (Route Param) - The conversation the message belongs to

Idempotency-Key (Header, optional) - A unique value for this message, for example a UUID. Reuse it when you retry the same message. See the note below the status table

FieldTypeDescription
bodystringRequired. The text of the reply. It cannot be empty

The reply is addressed to the conversation. It arrives in the thread as a Conversation message sent by the host, and Plum delivers it to the guest the same way a reply typed into the Plum inbox is delivered — you do not send the notification yourself

To send files with the reply, use the attachments route described in Attachments instead. A reply sent this way carries text only.

Response

messageId is the id of the message that was created. Read it back on List Messages, where it will now be the first entry.

| Status | When it happens |
| ------ | --------------------------------------------------------------------------------------------------------------------------------------- || 200 | The reply was sent. The body has the new messageId, and the conversation is marked read. A repeat of an earlier send with the same Idempotency-Key returns the original response, with the header Idempotent-Replayed: true || 400 | The token carries no usable user id |
| 401 | The Authorization header is missing, malformed or expired || 404 | No conversation with that id belongs to the authenticated host |
| 409 | A send with the same Idempotency-Key is still in progress. Wait, then retry with the same key |
| 422 | The Idempotency-Key was already used for a different message || 5xx | A transient failure reaching the messaging back end. Retry with the same Idempotency-Key: see the note below |Send an Idempotency-Key header to make retries safe. Create a new unique key, for example a UUID, for each message you mean to send. Reuse that key when you retry the same message.

We keep each key for 24 hours, for each caller, host and conversation.

  • Same key and same message: we do not send the message again. You get 200 with the original response and the header Idempotent-Replayed: true.
  • Same key and a different message: you get 422.
  • Same key while the first send is still in progress: you get 409. Wait and retry.

If our duplicate check is briefly unavailable, we still send the message, without the check.

Without the header, a retry of a call that actually succeeded can send the guest the message twice. After a 5xx or a timeout, read the thread back and check whether your reply is already there before you try again.