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
The MESSAGE_INBOUND trigger fires when your Conversation API app receives an inbound message from a contact on any channel (SMS, WhatsApp, RCS, etc.). This is the primary trigger for building conversational applications that respond to customer messages.
The webhook callback contains a message object with these key fields:
| Field | Type | Description |
|---|---|---|
id | string | Unique message identifier |
conversation_id | string | Conversation this message belongs to |
contact_id | string | Contact who sent the message |
channel | string | Channel the message came from (e.g., WHATSAPP, SMS, RCS) |
direction | string | Always TO_APP for inbound messages |
contact_message | object | The actual message content |
metadata | string | Optional metadata attached to the message |
accept_time | timestamp | When Sinch received the message |
channel_identity | object | Channel-specific sender information |
The contact_message field contains the message payload. The structure varies by message type:
Text Message:
{
"text_message": {
"text": "Hello, I need help with my order"
}
}Media Message:
{
"media_message": {
"url": "https://example.com/image.jpg",
"thumbnail_url": "https://example.com/thumb.jpg"
}
}Location Message:
{
"location_message": {
"title": "My Location",
"label": "Home",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
}
}Choice Response Message (from buttons/quick replies):
{
"choice_response_message": {
"message_id": "01HXXX...",
"postback_data": "buy_product_123"
}
}Reply Message (quoted/threaded reply):
{
"reply_message": {
"message_id": "01HXXX...",
"text_message": { "text": "Thanks!" }
}
}{
"app_id": "01H1234567...",
"accepted_time": "2024-06-15T14:23:45.123Z",
"event_time": "2024-06-15T14:23:44.890Z",
"project_id": "PROJECT123",
"message": {
"id": "01H9876543...",
"conversation_id": "01H5555555...",
"contact_id": "01H3333333...",
"channel": "WHATSAPP",
"direction": "TO_APP",
"contact_message": {
"text_message": {
"text": "Hi, I need help with my order #12345"
}
},
"channel_identity": {
"channel": "WHATSAPP",
"identity": "46732001122",
"app_id": "01H1234567..."
},
"conversation_channel": "WHATSAPP",
"accept_time": "2024-06-15T14:23:45.123Z",
"sender_id": "46732001122"
},
"message_metadata": ""
}The contact_message field varies by type — see Contact Message Types above for media_message, location_message, choice_response_message, and reply_message structures.
contact_message for the specific message type and handle accordinglychoice_response_message to capture user selections with postback_datamedia_message, download the media from the provided URL (may require authentication for some channels)conversation_id to maintain context across multiple messagescontact_id (persistent) or channel_identity.identity (channel-specific) to identify the sendermetadata field for any custom data you attached to the conversation or contactchannel field helps you adapt responses accordinglyskills
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