Skip to content
Get Started
Getting Started

Receiving messages

Receiving Messages | iMessage for Business

In order to enable receiving messages, you have to specify the webhooks that you want to use in your API dashboard.

Received Messages will be sent as a POST request to the webhook which you define. This example shows the JSON body for an inline reply:

{
"accountEmail": "your-account-email",
"content": "Hello!",
"is_outbound": false,
"status": "RECEIVED",
"error_code": null,
"error_message": null,
"error_reason": null,
"message_handle": "99DCC379-DD76-4712-BA65-11EFB33B8CD6",
"date_sent": "2025-12-12T15:41:20.932Z",
"date_updated": "2025-12-12T15:41:20.995Z",
"from_number": "+19998887777",
"number": "+19998887777",
"to_number": "+15122164639",
"was_downgraded": null,
"plan": "dedicated",
"media_url": "",
"message_type": "message",
"group_id": "",
"participants": ["+19998887777", "+15122164639"],
"send_style": "",
"opted_out": false,
"error_detail": null,
"sendblue_number": "+15122164639",
"service": "iMessage",
"group_display_name": null,
"reply_to": {
"message_handle": "2F172CD8-C082-4A54-B9B3-D5B78CF4D0C3"
},
"thread_originator": {
"message_handle": "2F172CD8-C082-4A54-B9B3-D5B78CF4D0C3"
}
}

iMessages sent from an Apple Account email

Section titled “iMessages sent from an Apple Account email”

An iMessage sender can use an Apple Account email address instead of a phone number. In that case, number and from_number contain the sender’s email address. This is an iMessage address, not an ordinary email delivery channel.

Preserve that sender identifier when processing the webhook. To reply using /api/send-message, pass it as number, just as you would a phone-number recipient. Do not substitute your Sendblue account identifier (accountEmail) or assume the sender’s phone number can be derived from the email address.

Callback Body FieldTypeDescription
accountEmailstringAssociated account email
contentstringMessage content
is_outboundbooleanTrue if message is sent, false if message is received
statusstringThe current status of the message
error_codeintError code (null if no error)
error_messagestringThe rule’s key when a rule declined the message (same as error_key), otherwise an error description (null if no error)
error_keystringStable key of the rule that declined the message (null otherwise). Branch on this field
error_reasonstringHuman-readable text for display, do not parse (null if no error)
error_detailstringDetailed error information (null if no error)
message_handlestringSendblue message handle
date_sentstringISO 8601 formatted date string of the date this message was created
date_updatedstringISO 8601 formatted date string of the date this message was last updated
from_numberstringSender’s E.164 phone number, or Apple Account email address for an email-origin iMessage
numberstringYour end-user’s sender identifier: an E.164 phone number or Apple Account email address
to_numberstringE.164 formatted phone number string of the message recipient
was_downgradedbooleanTrue if the end user does not support iMessage, null otherwise
planstringValue of the Sendblue account plan
media_urlstringA CDN link to any media attached to the message (expires after 30 days for inbound)
message_typestringType of message (e.g., “message”)
group_idstringGroup identifier (empty string for non-group messages)
participantsarrayArray of participant identifiers, which may include phone numbers and iMessage email addresses
send_stylestringExpressive message style if used (empty string if none)
opted_outbooleanTrue if the recipient has opted out
sendblue_numberstringThe Sendblue phone number that received the message
servicestringThe messaging service used (e.g., “iMessage”, “SMS”)
group_display_namestringDisplay name for group chats (null for non-group messages)
app_cardobjectApp Card session and state metadata when present. See App Cards.
reply_toobjectImmediate parent, with message_handle; omitted otherwise
thread_originatorobjectThread root, with message_handle and optional opaque Apple part; omitted otherwise

Inbound App Card events include extensionBundleId, teamId, balloonBundleId, url, sessionIdentifier, and a retry-stable revision inside app_card. The field is omitted from messages that are not App Cards.

See iMessage inline replies for sending replies and continuing an inbound thread.