Official Sinch API skills for AI coding agents — SMS, Voice, Verification, Numbers, Mailgun email, and more.
71
89%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
← Back to Conversation API SKILL.md
Sections: Overview | When It Fires | Callback Structure | Common Use Cases | Example Callback Payload | Key Points
The MESSAGE_DELIVERY trigger fires when there's an update to the delivery status of a message your app sent to a contact. This trigger provides real-time feedback on whether messages were successfully delivered, read, or failed, enabling you to track message lifecycle and handle delivery failures.
The webhook callback contains a message_delivery_report object with these key fields:
| Field | Type | Description |
|---|---|---|
message_id | string | ID of the message this status update is for |
conversation_id | string | Conversation the message belongs to |
status | string | Delivery status (see values below) |
channel_identity | object | Channel-specific recipient information |
contact_id | string | Contact who should receive the message |
reason | object | Error details (if status is FAILED) |
metadata | string | Metadata attached to the original message |
processing_mode | string | Processing mode used |
| Status | Description |
|---|---|
QUEUED_ON_CHANNEL | Message submitted to channel, awaiting delivery |
DELIVERED | Message delivered to recipient's device |
READ | Message read by recipient (WhatsApp, RCS only) |
FAILED | Message delivery failed permanently |
SWITCHING_CHANNEL | Message failed on one channel, switching to fallback |
| Field | Type | Description |
|---|---|---|
code | string | High-level error category |
description | string | Human-readable error description |
sub_code | string | Detailed error code |
Common Error Codes:
RECIPIENT_NOT_REACHABLE — Contact doesn't exist or is unavailable on the channelRECIPIENT_NOT_OPTED_IN — Contact hasn't opted in (required for some channels)OUTSIDE_ALLOWED_SENDING_WINDOW — WhatsApp 24-hour window expired, must use templateCHANNEL_FAILURE — Channel provider errorMEDIA_NOT_REACHABLE — Media URL inaccessible or invalidUNSUPPORTED_CONTENT — Channel doesn't support the message typeREJECTED_BY_CHANNEL — Channel rejected the message (e.g., policy violation){
"app_id": "01H1234567...",
"accepted_time": "2024-06-15T14:25:10.456Z",
"event_time": "2024-06-15T14:25:09.123Z",
"project_id": "PROJECT123",
"message_delivery_report": {
"message_id": "01H9876543...",
"conversation_id": "01H5555555...",
"status": "DELIVERED",
"channel_identity": {
"channel": "WHATSAPP",
"identity": "46732001122",
"app_id": "01H1234567..."
},
"contact_id": "01H3333333...",
"metadata": "order_confirmation_12345",
"processing_mode": "CONVERSATION"
}
}Same structure with status: "FAILED" and a reason object:
reason.code — e.g. RECIPIENT_NOT_REACHABLE, OUTSIDE_ALLOWED_SENDING_WINDOWreason.sub_code — e.g. UNDELIVERABLE_DESTINATION, CHANNEL_POLICY_VIOLATIONreason.description — human-readable explanationStatus SWITCHING_CHANNEL indicates fallback to an alternative channel. Includes reason explaining why the primary channel failed.
QUEUED_ON_CHANNEL → DELIVERED → READREAD status; most channels only confirm deliveryreason.code and reason.sub_code to understand why delivery failedCHANNEL_FAILURE), implement retry logic; for permanent failures (like RECIPIENT_NOT_REACHABLE), don't retryOUTSIDE_ALLOWED_SENDING_WINDOW error means you must use approved WhatsApp templates instead of free-form messagesSWITCHING_CHANNEL indicates automatic failover to an alternative channelmetadata field to correlate delivery reports with your internal systems (e.g., order IDs, ticket numbers)CONVERSATION mode manages channel selection automatically; DISPATCH mode sends to specific channels without fallbackDELIVERED means delivered to the device, not that the user saw it; only READ confirms user engagementskills
sinch-10dlc
references
sinch-authentication
sinch-conversation-api
sinch-elastic-sip-trunking
references
sinch-fax-api
sinch-imported-numbers-hosting-orders
references
sinch-in-app-calling
sinch-mailgun
references
sinch-mailgun-inspect
references
sinch-mailgun-optimize
references
sinch-mailgun-validate
sinch-number-lookup-api
sinch-number-order-api
sinch-numbers-api
references
sinch-porting-api
sinch-provisioning-api
sinch-sdks
sinch-verification-api