# Sinch API Sip Trunks

> List or create SIP trunks via Sinch Elastic SIP Trunking API

- Skill: `sinch/sinch-api-sip-trunks` (Agent Skill)
- Install (CLI): `npx skillmds@latest add sinch/sinch-api-sip-trunks`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sinch/sinch-api-sip-trunks/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: sinch (https://skillmd.com/u/sinch)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/sinch/sinch-api-sip-trunks

---


# Elastic SIP Trunking — Trunks

List or create SIP trunks using the Sinch Elastic SIP Trunking API. Trunks are the top-level resource for SIP connectivity. Uses OAuth2.

**IMPORTANT: Execute this command directly. Do NOT generate script files. Perform the API call immediately.**

## Input

- `--action` / `-a`: list or create - optional, default list
- `--name` / `-n`: Trunk name (for create) - required if action=create
- `--host-name` / `-h`: SIP hostname for the trunk (for create) - optional
- `--format` / `-f`: Output format (table or json) - optional

Arguments: $ARGUMENTS

## Instructions

**Execute these steps directly - do not write code or scripts:**

0. If $ARGUMENTS empty: ask "List trunks or create one?" and for create get name, hostname. Otherwise parse.

1. Validate: --action (list|create), for create require --name. Get CONVERSATION_PROJECT_ID, CONVERSATION_KEY_ID, CONVERSATION_KEY_SECRET. Base: https://elastic-trunking.api.sinch.com/v1. If missing, report "Sinch API is not configured."

2. If list: GET https://elastic-trunking.api.sinch.com/v1/projects/{projectId}/trunks with OAuth2. Display table (id, name, hostName, createTime) or JSON.

3. If create: POST .../trunks with body { name, hostName }. Return trunk id and hostname. Note: use trunk-specific hostname (e.g. {trunk-hostname}.pstn.sinch.com) for SIP INVITEs, not generic trunk.pstn.sinch.com.

4. "✅ Trunks listed" or "✅ Trunk created". Handle 401, 400, 404. Handle all errors gracefully.

## Examples

```
/sinch-api-sip-trunks
/sinch-api-sip-trunks --action=create --name="Production" --host-name=sip.example.com
```

## API Reference

- **Base URL**: https://elastic-trunking.api.sinch.com/v1
- **List**: GET /projects/{projectId}/trunks
- **Create**: POST /projects/{projectId}/trunks
- **Documentation**: https://developers.sinch.com/docs/elastic-sip-trunking/

