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_...). REST operations also require API Access for the credential's workspace. Keys can be restricted to scopes such as assistants:read, calls:write, campaigns:write, automations:read, dashboards:read, dashboards:write, leads:write, segments:write, loop:read, loop:write, phone_numbers:write, sip_trunks:write, knowledge:write, voices:read, billing:read, billing:write, 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 within the workspace's available capabilities.

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[]
required

Exactly one inbound match number is required. DID: E.164. Extension: E.164 or national digits without country code.

Required array length: 1 element
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.

outbound_from_user_mode
enum<string>
default:phone_number

Outbound From user for your own SIP trunk. Phone number preserves the existing behavior. SIP username uses the authentication username and keeps the primary DID unchanged. Not available on imported carrier connections.

Available options:
phone_number,
auth_username
outbound_caller_id_header
enum<string>
default:from_display

Used with SIP username identity. The primary international DID is sent in the From display name and optionally the selected identity header. Match the carrier caller ID settings.

Available options:
from_display,
p_asserted_identity,
p_preferred_identity

Response

The created SIP trunk (sanitized).

data
object
required

Customer-owned BYO/BYOC SIP trunk. Managed platform trunks, passwords, and internal trunk identifiers are never returned.