Official Sinch API skills for AI coding agents — SMS, Voice, Verification, Numbers, Mailgun email, and more.
69
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Summary — not the spec. This file orients you and links to the authoritative
developers.sinch.comdoc; it may lag, omit fields, or simplify nesting. Do not copy field names, nesting, encodings, or enums from here into shipped code without confirming them in the linked doc. See "Source of Truth" in this skill's SKILL.md.
Reference for handling inbound Conversation API webhooks in a function. Loaded on-demand from SKILL.md.
This covers the functions-specific glue — how inbound webhooks route to your handler and the helpers for reading events. For outbound message bodies (channels, templates, rich cards, carousels), see the sinch-conversation-api skill.
Simple approach — export a handler function:
export async function conversationWebhook(context, request) {
const body = request.body;
// handle MESSAGE_INBOUND, MESSAGE_DELIVERY, etc.
return { statusCode: 200, body: { ok: true } };
}Structured approach — extend ConversationController:
import { ConversationController, getText, getChannel, getContactId } from '@sinch/functions-runtime';
class Bot extends ConversationController {
async handleMessageInbound(event) {
const text = getText(event);
if (!text) return;
await this.conversation.messages.send({
sendMessageRequestBody: this.reply(event, `Echo: ${text}`),
});
}
}Message helpers: getText, getMedia, getPostbackData, getContactId, getConversationId, getChannel, getIdentity, getTo, getLocation, isTextMessage, isMediaMessage, isPostback
Routing: the webhook path is /webhook/conversation (export name conversationWebhook), NOT /conversation. The /webhook/<service> prefix is special-cased to <service>Webhook camelCase.
scripts
skills
sinch-10dlc
references
sinch-authentication
sinch-cli
sinch-conversation-api
sinch-elastic-sip-trunking
references
sinch-fax-api
sinch-functions
sinch-functions-dotnet
sinch-functions-node
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-mms
sinch-number-lookup-api
sinch-number-order-api
sinch-numbers-api
sinch-porting-api
sinch-provisioning-api
sinch-rcs
sinch-sdks
sinch-sms
scripts
sinch-verification-api
sinch-voice-api
sinch-whatsapp