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.
import { SinchClient } from "@sinch/sdk-core";
const sinch = new SinchClient({
applicationKey: "YOUR_APPLICATION_KEY",
applicationSecret: "YOUR_APPLICATION_SECRET",
});const response = await sinch.voice.callouts.tts({
ttsCalloutRequestBody: {
destination: { type: "number", endpoint: "+14045005000" },
cli: "+14045001000",
locale: "en-US",
text: "Hello! This is a test call from Sinch.",
},
});
console.log("Call ID:", response.callId);const response = await sinch.voice.callouts.conference({
conferenceCalloutRequestBody: {
destination: { type: "number", endpoint: "+14045005000" },
cli: "+14045001000",
conferenceId: "myConference",
enableAce: true,
enableDice: true,
},
});
console.log("Call ID:", response.callId);const response = await sinch.voice.callouts.custom({
customCalloutRequestBody: {
destination: { type: "number", endpoint: "+14045005000" },
cli: "+14045001000",
ice: JSON.stringify({
action: {
name: "connectPstn",
number: "+14045009000",
cli: "+14045001000",
},
}),
ace: JSON.stringify({
action: { name: "continue" },
}),
},
});const callInfo = await sinch.voice.calls.get({
callId: "4398599d1ba84ef3bde0a82dfb61abed",
});
console.log("Status:", callInfo.status);
console.log("Duration:", callInfo.duration);await sinch.voice.calls.update({
callId: "4398599d1ba84ef3bde0a82dfb61abed",
spiRequestBody: {
instructions: [
{ name: "say", text: "This call will now end.", locale: "en-US" },
],
action: { name: "hangup" },
},
});await sinch.voice.calls.manageWithCallLeg({
callId: "4398599d1ba84ef3bde0a82dfb61abed",
callLeg: "callee",
spiRequestBody: {
instructions: [
{ name: "playFiles", ids: ["#tts[Please hold.]"], locale: "en-US" },
],
action: { name: "continue" },
},
});const conf = await sinch.voice.conferences.get({
conferenceId: "myConference",
});
console.log("Participants:", conf.participants);await sinch.voice.conferences.kickAll({
conferenceId: "myConference",
});await sinch.voice.conferences.manageParticipant({
conferenceId: "myConference",
callId: "4398599d1ba84ef3bde0a82dfb61abed",
manageParticipantRequestBody: { command: "mute" },
});import express from "express";
const app = express();
app.use(express.json());
app.post("/voice/ice", (req, res) => {
const { cli, to } = req.body;
console.log(`Incoming call from ${cli} to ${to.endpoint}`);
res.json({
instructions: [
{ name: "say", text: "Welcome! Press 1 for sales.", locale: "en-US" },
],
action: {
name: "runMenu",
mainMenu: "main",
menus: [
{
id: "main",
mainPrompt: "#tts[Press 1 for sales or 2 for support.]",
options: [
{ dtmf: 1, action: "return(sales)" },
{ dtmf: 2, action: "return(support)" },
],
},
],
},
});
});
app.post("/voice/ace", (req, res) => {
res.json({ action: { name: "continue" } });
});
app.post("/voice/pie", (req, res) => {
const { menuResult } = req.body;
const number = menuResult.value === "sales" ? "+14045009001" : "+14045009002";
res.json({
instructions: [
{ name: "say", text: `Connecting you to ${menuResult.value}.`, locale: "en-US" },
],
action: { name: "connectPstn", number, cli: "+14045001000" },
});
});
app.post("/voice/dice", (req, res) => {
console.log(`Call ended: ${req.body.reason}, duration: ${req.body.duration}s`);
res.sendStatus(200);
});
app.listen(3000);skills
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-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