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 They Fire | Callback Structure | Supported Channels | Common Use Cases | Example Callback Payloads | Handling SMS Opt-Outs | Key Points
The OPT_IN and OPT_OUT triggers fire when a contact opts in or out of messaging through channel-specific mechanisms. These triggers are only supported on select channels that have native opt-in/opt-out functionality (primarily Viber Business Messages).
Important: These triggers are NOT fired for SMS STOP keywords or similar text-based opt-out mechanisms. SMS opt-outs are handled through MESSAGE_INBOUND.
MESSAGE_INBOUND text message){
"app_id": "01H1234567...",
"accepted_time": "2024-06-15T14:30:00.123Z",
"project_id": "PROJECT123",
"opt_in_notification": {
"contact_id": "01H3333333...",
"channel": "VIBER",
"identity": "46732001122",
"status": "OPT_IN_SUCCEEDED"
}
}{
"app_id": "01H1234567...",
"accepted_time": "2024-06-15T15:45:00.456Z",
"project_id": "PROJECT123",
"opt_out_notification": {
"contact_id": "01H3333333...",
"channel": "VIBER",
"identity": "46732001122",
"status": "OPT_OUT_SUCCEEDED"
}
}| Field | Type | Description |
|---|---|---|
contact_id | string | Contact who opted in/out |
channel | string | Channel where opt action occurred |
identity | string | Channel-specific identity (e.g., phone number) |
status | string | OPT_IN_SUCCEEDED or OPT_OUT_SUCCEEDED |
| Channel | OPT_IN Support | OPT_OUT Support | Notes |
|---|---|---|---|
| Viber Business Messages | ✅ Yes | ✅ Yes | Native UI buttons |
| ❌ No | ❌ No | Use MESSAGE_INBOUND for text-based opt-in/out | |
| SMS | ❌ No | ❌ No | Handle "STOP" via MESSAGE_INBOUND |
| RCS | ❌ No | ❌ No | No native opt-in/out mechanism |
| MMS | ❌ No | ❌ No | Handle via MESSAGE_INBOUND |
| Messenger | ❌ No | ❌ No | Platform-managed subscriptions |
Note: Channel support may expand in the future. Check Sinch documentation for current channel support.
{
"app_id": "01H1234567...",
"accepted_time": "2024-06-15T14:30:00.123Z",
"event_time": "2024-06-15T14:29:59.890Z",
"project_id": "PROJECT123",
"opt_in_notification": {
"contact_id": "01H3333333...",
"channel": "VIBER",
"identity": "46732001122",
"status": "OPT_IN_SUCCEEDED"
}
}Opt-out uses the same structure with opt_out_notification and OPT_OUT_SUCCEEDED.
SMS opt-outs are handled through MESSAGE_INBOUND when a contact replies with keywords like "STOP", "UNSUBSCRIBE", "END". You must detect these in your webhook handler and update your suppression list.
MESSAGE_INBOUND messages, not via these triggersOPT_IN_SUCCEEDED and OPT_OUT_SUCCEEDED; there's no failed statuscontact_id to identify who opted in/out; identity shows the channel-specific identifierskills
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