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
The Sinch Elastic SIP Trunking (EST) API lets you programmatically provision SIP trunks and route voice traffic between customer infrastructure and the PSTN. The core workflow is: create a trunk, authorize it (ACL or credentials), attach endpoints, assign phone numbers.
Before generating code, ask the user these clarifying questions:
Only ask questions 2-3 when relevant to the user's direction. Wait for answers, then follow the matching workflow below.
User wants EST →
├─ Outbound only
│ ├─ Static IPs → Workflow A (Trunk + ACL)
│ └─ Dynamic IPs → Workflow E (Trunk + Credential List / Digest Auth)
├─ Inbound only
│ ├─ Static IP → Workflow B (Trunk + Static Endpoint + Phone Number)
│ └─ Dynamic IP → Workflow D (Trunk + Credential List + Registered Endpoint + Phone Number)
└─ Both → Workflow C (Trunk + ACL/Creds + Endpoint + Phone Number)Create Trunk → Create ACL/Credentials → Link to Trunk → Assign Phone Numbers → Create Endpointtrunk.pstn.sinch.com. ALWAYS use {your-hostname}.pstn.sinch.com.priority: 1 is primary; priority: 100 is failover.null.Store credentials in environment variables — never hardcode tokens or keys in commands or source code:
export SINCH_PROJECT_ID="your-project-id"
export SINCH_KEY_ID="your-key-id"
export SINCH_KEY_SECRET="your-key-secret"
export SINCH_ACCESS_TOKEN="your-oauth-token"Ensure that authentication headers are properly set when making API calls. The Elastic SIP Trunking API uses Bearer token authentication:
-H "Authorization: Bearer $SINCH_ACCESS_TOKEN"See sinch-authentication for full setup, most importantly how to obtain {SINCH_ACCESS_TOKEN} (OAuth2 client-credentials — do not mint your own JWT).
See sinch-sdks for installation and client initialization. Note: EST is only supported in the Node.js SDK — for Java, Python, and .NET, use direct HTTP calls.
curl -X POST \
"https://elastic-trunking.api.sinch.com/v1/projects/$SINCH_PROJECT_ID/trunks" \
-H "Authorization: Bearer $SINCH_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "my-trunk", "hostName": "my-trunk"}'Response includes sipTrunkId and hostName — use {hostName}.pstn.sinch.com for all SIP routing.
For SDK examples, see the Getting Started Guide.
hostName used in SIP routing.203.0.113.10/32).GET /trunks/{trunkId}/accessControlLists — confirm ACL appearsAPI docs: Create trunk → Create ACL → Link ACL to trunk → List ACLs for trunk
GET /trunks/{trunkId}/endpoints and GET /trunks/{trunkId}/phoneNumbersAPI docs: Create trunk → Create SIP endpoint → Get phone numbers
GET /trunks/{trunkId}/accessControlLists, GET /trunks/{trunkId}/endpoints, GET /trunks/{trunkId}/phoneNumbersAPI docs: Create trunk → Create ACL → Link ACL to trunk → Create SIP endpoint → Get phone numbers
{hostname}.pstn.sinch.comGET /trunks/{trunkId}/endpoints and GET /trunks/{trunkId}/phoneNumbersAPI docs: Create trunk → Credential Lists → Create SIP endpoint → Get phone numbers
GET /trunks/{trunkId}/credentialLists — confirm credential list appearsAPI docs: Create trunk → Credential Lists → Add credential list to trunk → List credential lists for trunk
| Header | Value | Notes |
|---|---|---|
From | sip:+1E164@{your-hostname}.pstn.sinch.com | Must be your trunk domain. Wrong domain → 403. Use E.164 format. |
To | sip:+1E164@{your-hostname}.pstn.sinch.com | Destination in E.164 + your trunk domain. In most cases, same as Request-URI. |
Request-URI | sip:+1E164@{your-hostname}.pstn.sinch.com | Destination in E.164 + your trunk domain. In most cases, same as To. |
/32 for single IP, /24 for range).updateCountryPermissions.projectId, not the Voice Application Key.For SIP error codes and debugging runbooks, see references/diagnostics.md.
Quick reference:
From domain{hostname}.pstn.sinch.com)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