iMessage inline replies
Reply to a specific iMessage and preserve its conversation thread
Inline replies let a new iMessage appear as a reply to a specific message in
Messages. You can continue a thread by replying to any message whose
message_handle was returned by Sendblue.
Send a reply
Section titled “Send a reply”Add a reply_to object to a normal send request. Use the exact public
message_handle returned by a Sendblue API response or webhook.
curl -X POST https://api.sendblue.com/api/send-message \ -H "sb-api-key-id: YOUR_API_KEY" \ -H "sb-api-secret-key: YOUR_API_SECRET" \ -H "Content-Type: application/json" \ -d '{ "number": "+14155550100", "from_number": "+14155550199", "content": "Yes, that works for me.", "reply_to": { "message_handle": "99DCC379-DD76-4712-BA65-11EFB33B8CD6" } }'| Parameter | Type | Required | Description |
|---|---|---|---|
reply_to | object | Yes | Identifies the immediate parent message |
reply_to.message_handle | string | Yes | Public handle of the message being replied to |
For an attachment represented by its own inbound webhook, use that webhook’s
message_handle. Sendblue retains the authoritative Apple attachment-part
identity behind the public handle, so callers do not need to infer an index
from upload order.
Reply in a group
Section titled “Reply in a group”Use the same fields with /api/send-group-message. The existing group_id and
from_number are required, and the target must belong to that group and line.
{ "group_id": "group_123456", "from_number": "+14155550199", "content": "Following up in this thread.", "reply_to": { "message_handle": "2F172CD8-C082-4A54-B9B3-D5B78CF4D0C3" }}Inline replies also work with /api/send-carousel; include the reply_to object
alongside the normal number, from_number, and media_urls parameters.
Thread fields in responses and webhooks
Section titled “Thread fields in responses and webhooks”Reply relationships are returned on message responses, status callbacks, and inbound/outbound message webhooks.
{ "message_handle": "5a17319e-cbcf-443e-897e-d8b0c04b1b09", "content": "Yes, that works for me.", "service": "iMessage", "reply_to": { "message_handle": "99DCC379-DD76-4712-BA65-11EFB33B8CD6", "part_index": 0 }, "thread_originator": { "message_handle": "99DCC379-DD76-4712-BA65-11EFB33B8CD6" }}| Field | Description |
|---|---|
reply_to.message_handle | Public handle of the immediate parent message |
reply_to.part_index | Server-reported parent part when authoritative; do not send this field |
thread_originator.message_handle | Public handle of the message that started the thread |
thread_originator.part | Opaque Apple thread-originator part descriptor when available |
The thread-originator fields are response fields. Do not send them when creating a reply; Sendblue derives them from the target message.
Validation
Section titled “Validation”Sendblue rejects a reply when:
- The target handle is missing or empty.
- The target belongs to another account, conversation, group, or Sendblue line.
- The target is not in a replyable sent or received state.
- The destination is not an iMessage conversation or its V2 worker does not support inline replies.
A rejected reply is not sent as a standalone message and is not downgraded to
SMS. Handle the returned 400 response as a validation failure.