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
npm install @sinch/sdk-core (v1.4.0+)
import { SinchClient } from '@sinch/sdk-core';
const sinch = new SinchClient({
projectId: process.env.SINCH_PROJECT_ID!,
keyId: process.env.SINCH_KEY_ID!,
keySecret: process.env.SINCH_KEY_SECRET!,
});const response = await sinch.numbers.availableNumber.list({
projectId: config.projectId,
regionCode: 'US',
type: 'LOCAL',
capabilities: ['SMS'],
size: 10,
});
const available = response.availableNumbers || [];Pattern matching: add 'numberPattern.pattern': '2020' and 'numberPattern.searchPattern': 'CONTAINS'.
const number = await sinch.numbers.availableNumber.checkAvailability({
projectId: config.projectId,
phoneNumber: '+12025550134',
});await sinch.numbers.availableNumber.rent({
projectId: config.projectId,
phoneNumber: '+12025550134',
rentNumberRequestBody: {
smsConfiguration: { servicePlanId: 'YOUR_SERVICE_PLAN_ID' },
},
});const rented = await sinch.numbers.availableNumber.rentAny({
projectId: config.projectId,
rentAnyNumberRequestBody: {
regionCode: 'US',
type: 'LOCAL',
capability: ['SMS'],
smsConfiguration: { servicePlanId: 'YOUR_SERVICE_PLAN_ID' },
},
});Note:
rentAnyusescapability(singular), unlikelistwhich usescapabilities(plural).
const response = await sinch.numbers.activeNumber.list({
projectId: config.projectId,
regionCode: 'US',
type: 'LOCAL',
pageSize: 100,
});
const numbers = response.activeNumbers || [];const allNumbers: Numbers.ActiveNumber[] = [];
for await (const number of sinch.numbers.activeNumber.list({
projectId: config.projectId,
regionCode: 'US',
type: 'LOCAL',
pageSize: 100,
})) {
allNumbers.push(number);
}const number = await sinch.numbers.activeNumber.get({
projectId: config.projectId,
phoneNumber: '+12025550134',
});await sinch.numbers.activeNumber.update({
projectId: config.projectId,
phoneNumber: '+12025550134',
updateActiveNumberRequestBody: {
displayName: 'Updated Name',
smsConfiguration: { servicePlanId: 'NEW_SERVICE_PLAN_ID' },
},
});await sinch.numbers.activeNumber.release({
projectId: config.projectId,
phoneNumber: '+12025550134',
});const regions = await sinch.numbers.availableRegions.list({
projectId: config.projectId,
});// Get current config
const cbConfig = await sinch.numbers.callbackConfiguration.get({
projectId: config.projectId,
});
// Update HMAC secret
await sinch.numbers.callbackConfiguration.update({
projectId: config.projectId,
callbackConfigurationUpdateRequest: {
hmacSecret: 'YOUR_HMAC_SECRET',
},
});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-number-lookup-api
sinch-number-order-api
sinch-numbers-api
references
sinch-porting-api
sinch-provisioning-api
sinch-sdks
sinch-verification-api