Update a SIP trunk
const url = 'https://api.caller9.app/v1/trunks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","default_cid_number_guid":"example","cid_display_name":"example","channel_limit":1,"localization":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.caller9.app/v1/trunks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "default_cid_number_guid": "example", "cid_display_name": "example", "channel_limit": 1, "localization": "example" }'Updates a trunk. Omitted fields are unchanged. Channel limit and localization changes take effect on the live connection. Requires a full-access key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”SIP trunk ID (UUID).
Request Bodyrequired
Section titled “Request Bodyrequired”object
ID of one of the organization’s numbers; null or "" clears it.
Outbound caller ID name (CNAM), normalized as on create. "" clears it.
Maximum concurrent calls; null for unlimited (not allowed on Basic, max 5 there).
ISO 3166-1 alpha-2 country code.
Example generated
{ "name": "example", "default_cid_number_guid": "example", "cid_display_name": "example", "channel_limit": 1, "localization": "example"}Responses
Section titled “Responses”The updated trunk.
object
A SIP trunk your PBX registers to. Includes registration credentials — sip_password is a secret; store it securely and never log it.
object
SIP registration username.
SIP registration password (secret). Changes when rotated.
The trunk’s SIP URI (sip:<username>@sip.telnyx.com).
ID of the organization number used as the default outbound caller ID.
Outbound caller ID name (CNAM); empty if unset.
Maximum concurrent calls; null = unlimited.
ISO 3166-1 alpha-2 country code (default US).
Numbers routed to this trunk for inbound calls, sorted by number.
object
E.164 phone number.
Example generated
{ "trunk": { "guid": "example", "organization_guid": "example", "name": "example", "sip_username": "example", "sip_password": "example", "sip_uri": "example", "default_cid_number_guid": "example", "cid_display_name": "example", "channel_limit": 1, "localization": "example", "numbers": [ { "guid": "example", "number": "example", "name": "example" } ], "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z" }}The request was invalid.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Missing, invalid, expired or revoked API key.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}The key isn’t allowed to do this (e.g. a read-only key making a change).
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Not found, or belongs to another organization.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Blocked by the organization’s plan.
object
Which cap was hit, e.g. studios, numbers, ai_screening, trunk_channels.
Example
{ "error": "plan_limit"}Too many requests for this API key. Retry after Retry-After seconds.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Headers
Section titled “Headers”Seconds until the rate-limit window resets.