Skip to main content
POST
Create a SIP trunk

Authorizations

Authorization
string
header
required

API key (fam_..., created under Settings → API Keys) or an OAuth 2.0 access token (fam_at_...). Keys can be restricted to scopes such as assistants:read, calls:write, campaigns:write, automations:read, dashboards:read, dashboards:write, leads:write, segments:write, phone_numbers:write, sip_trunks:write, knowledge:write, voices:read, billing:read, settings:write, platform:read, platform:write; a *:write scope implies the matching *:read. Automation and dashboard endpoints also accept the legacy calls:* scope. Keys without scope restrictions have full access.

Body

application/json
name
string
required
sip_address
string
required

Provider termination host, e.g. sip.provider.com (no sip: prefix, no port).

numbers
string[]

DID: one E.164 required. Extension: optional primary (E.164 or national digits without country code). Omit or empty for extension receive-only.

Maximum array length: 1
trunk_kind
enum<string>
default:did
Available options:
did,
extension
provider
enum<string>
default:custom
Available options:
twilio,
custom
auth_username
string
auth_password
string

Stored server-side; never returned by the API.

inbound_auth_username
string
inbound_auth_password
string

Stored server-side; never returned by the API.

credential_mode
enum<string>
default:shared
Available options:
shared,
separate
outbound_auth_mode
enum<string>
default:credentials
Available options:
credentials,
none
transport
enum<string>
default:auto
Available options:
auto,
udp,
tcp,
tls
calling_number_format
enum<string>
default:e164_plus
Available options:
e164_plus,
e164_no_plus,
national
destination_country
string

ISO-3166 alpha-2 for outbound region pinning, or empty for automatic.

secure_trunking
boolean
default:false

TLS signaling + SRTP media.

media_encryption
enum<string>
Available options:
allow,
require,
disable
outbound_headers
object

Custom outbound INVITE headers (max 10).

inbound_headers
object
headers_to_attributes
object
outbound_headers_to_attributes
object
include_headers
enum<string>
default:none
Available options:
none,
x,
all
media_codecs
enum<string>[]
Available options:
PCMU,
PCMA,
G722,
AMR-WB
only_listed_codecs
boolean
default:false
media_timeout_sec
integer
Required range: 1 <= x <= 3600
ringing_timeout_sec
integer
Required range: 5 <= x <= 600
metadata
object

May include inbound auth mode (inbound_auth, allowed_addresses) and region hints.

Response

The created SIP trunk (sanitized).

data
object
required

SIP trunk (sanitized — auth_password and inbound_auth_password are never returned).