Sign inGet Started

Update a SIP trunk

PATCH
/v1/voice/trunks/{trunk_id}
const trunk = await bird.voice.trunks.update("spt_01krdgeqcxet5s7t44vh8rt9mg", {
  // Each list replaces the previous one, so send what you want to end up with.
  ip_acls: [{ cidr: "203.0.113.0/24", description: "Amsterdam PBX" }],
});
console.log(trunk.ip_acls);
Response200
{
  "id": "spt_01krdgeqcxet5s7t44vh8rt9mg",
  "workspace_id": "ws_01krdgeqcxet5s7t44vh8rt9mg",
  "name": "Production PBX trunk",
  "domain": "01kxp5bb9qf878642atrf0xy5r.trunk.eu1.sip.bird.com",
  "ip_acls": [
    {
      "id": "sta_01krdgeqcxet5s7t44vh8rt9mg",
      "trunk_id": "spt_01krdgeqcxet5s7t44vh8rt9mg",
      "cidr": "203.0.113.0/24",
      "description": "Office network"
    }
  ],
  "allowed_api_key_ids": [
    "key_01krdgeqcxet5s7t44vh8rt9mg"
  ],
  "ineligible_api_key_ids": [
    "key_01krdgeqcxet5s7t44vh8rt9mg"
  ],
  "digest_algorithms": [
    "SHA-256",
    "MD5"
  ],
  "media": {
    "encryption": "preferred",
    "sites": [
      "ap1",
      "eu1",
      "us1"
    ]
  },
  "created_at": "2026-05-20T09:14:52Z",
  "updated_at": "2026-05-25T16:42:01Z"
}

Updates a SIP trunk's name, access control (ip_acls, allowed_api_key_ids), and Digest algorithm offer (digest_algorithms). Omitted fields stay unchanged; each list, when present, replaces the previous list wholesale. An empty body or invalid list entry returns a 422 validation_error; a trunk outside the workspace returns a 404 not_found_error. Turning inbound off returns 412 if it would leave a live emergency number without a supported callback route.

Parameters

trunk_idstring

ID of the SIP trunk to retrieve, update, or delete.

Request Payload

name
string

A human-readable label for this SIP trunk. Mutable, and distinct from the generated wire domain.

sip_trunking_enabled
boolean

Whether your PBX may place calls through this trunk. Turning it off stops the allow lists admitting calls at the next call setup and leaves them stored, so turning it back on restores a working trunk. Omit the field to leave it unchanged.

did_delivery_enabled
boolean

Whether this trunk may receive calls. Turning it off resets number routes that use this trunk to reject incoming calls. Turning it back on does not restore those routes. Clear an attached emergency number in the dashboard before turning it off. The gateways remain configured. Omit the field to leave it unchanged.

workspace_users_enabled
boolean

Whether people in this workspace may place calls through this trunk with a session credential, from the dashboard phone, the CLI or MCP. Turning it off stops those calls at the next call setup without re-issuing anything. Omit the field to leave it unchanged.

outbound_enabled
boolean

Deprecated: use sip_trunking_enabled and workspace_users_enabled. true turns on sip_trunking_enabled. false stops every caller placing calls through this trunk. A request that also turns one of those switches the other way is rejected.

inbound_enabled
boolean

Deprecated: use did_delivery_enabled. A request that sends both with different values is rejected.

media_bypass
boolean

Whether we take ourselves out of the audio path for calls we forward to this trunk. Turning it on takes effect at the next call setup and leaves calls already up untouched. It is an inbound setting, so the trunk must have did_delivery_enabled on; one update can do both. While it is on we cannot record those calls, report their audio quality, or end one because its audio stopped, and your equipment must be reachable for audio from the public internet. Turning it off puts us back in the path at the next call setup. Omit the field to leave it unchanged.

media
object

A change to how the trunk carries call audio.

Show child parameters
ip_acls
array of object

Replaces the trunk's entire IP allow list. When present, the allow list is set to exactly these CIDR blocks: ranges not listed are removed and new ones are added. Send an empty array to clear the list, turning IP filtering off. Omit the field to leave the allow list unchanged.

Show child parameters
allowed_api_key_ids
array of string

Replaces the trunk's entire set of allowed API keys. When present, exactly these keys may authenticate the trunk over SIP Digest. Each key you ADD must belong to this workspace and hold voice at write level; a key that does not is refused and the whole update is rolled back. A key already on the list that has since lost the permission or expired does not block the update, so you can keep editing the trunk while you put its permission back. A non-empty list turns API-key authentication on; send an empty array to turn it off. Omit the field to leave the allowed keys unchanged.

digest_algorithms
array of string

Replaces the Digest hash algorithms this trunk offers, in the order they should be offered. Send ["MD5"] for a PBX that only implements MD5 and rejects or ignores a challenge offering SHA-256 first. Send an empty array to return to the default of ["SHA-256", "MD5"]. The offer is never empty, because a trunk that offered nothing could not be authenticated at all. The list governs clients that authenticate with an API key, and narrowing it also narrows what the trunk accepts from them: an answer using an algorithm no longer offered is rejected. Session credentials, including the dashboard phone's, are always offered MD5 as well and accepted with MD5 or SHA-256. Takes effect on the next call setup; no credential is re-issued. Omit the field to leave the offer unchanged.

session_credentials_enabled
boolean

Deprecated: use workspace_users_enabled. A request that sends both with different values is rejected.

Response Payload

id
string
required

Unique identifier for this SIP trunk.

workspace_id
string
required
name
string
required

A human-readable label for this SIP trunk. Mutable, and distinct from the generated wire domain.

domain
string
required

Full SIP address for this trunk, generated as {trunk-id}.trunk.{region}.sip.bird.com. This is the trunk's identity, so configure your PBX or SIP client to send calls to this address. It is derived from the trunk id and cannot be chosen or changed.

sip_trunking_enabled
boolean
required

Whether your PBX may place calls through this trunk, admitted by ip_acls or allowed_api_key_ids. Off on a new trunk. While it is off, the allow lists admit no call. Set sip_trunking_enabled when you create the trunk or through the trunk update operation.

did_delivery_enabled
boolean
required

Whether this trunk may receive calls: we dial the addresses you declared, for the numbers this trunk answers. Off on a new trunk. Turning it off resets number routes that use this trunk to reject incoming calls. Turning it back on does not restore those routes. Set did_delivery_enabled when you create the trunk or through the trunk update operation.

workspace_users_enabled
boolean
required

Whether people in this workspace may place calls through this trunk with a session credential, from the dashboard phone, the CLI or MCP. Off on a new trunk. It grants nothing on its own: a call still has to present a credential issued to this workspace, and each one expires within minutes. Set workspace_users_enabled when you create the trunk or through the trunk update operation.

outbound_enabled
boolean
required

Deprecated: read sip_trunking_enabled and workspace_users_enabled instead. true while any caller may place calls through this trunk.

inbound_enabled
boolean
required

Deprecated: read did_delivery_enabled, which has the same value.

media_bypass
boolean
required

Whether we take ourselves out of the audio path for calls we forward to this trunk: your equipment and the originating carrier exchange audio directly, and only the call signalling passes through us. Off by default. It applies to inbound calls alone (calls this trunk places are always carried through us, whatever this says). While it is on we cannot record those calls, report their audio quality, or end one because its audio stopped. Your equipment must be reachable for audio from the public internet. Set media_bypass through the trunk update operation.

ip_acls
array of object
required

The trunk's IP allow list. IP filtering is active whenever this has at least one entry: calls admitted through the allow lists must come from those CIDR ranges. This restriction does not apply to session credentials when workspace_users_enabled is true. An empty list means no IP restriction. Replace the whole ip_acls list through the trunk update operation.

Show child attributes
allowed_api_key_ids
array of string
required

The API keys allowed to authenticate this trunk over SIP Digest. A key must hold voice at write level and be neither revoked nor expired to authenticate. ineligible_api_key_ids names the entries that currently cannot. A nonempty list enables API-key authentication, limited to its eligible keys. An empty list means no API-key authentication. A trunk with empty ip_acls and allowed_api_key_ids lists accepts no call from your PBX. Replace the whole allowed_api_key_ids list through the trunk update operation.

ineligible_api_key_ids
array of string
required

The entries in allowed_api_key_ids that cannot authenticate this trunk right now because the key lacks voice at write level, has expired, or was revoked. The bindings remain until you remove them from the trunk. Restoring voice at write level makes a key eligible again if it is still unexpired and unrevoked, without changing its secret or trunk binding. Empty when every allowed key can authenticate.

digest_algorithms
array of string
required

The Digest hash algorithms this trunk offers, in the order they are offered. We send one challenge line per algorithm and your PBX answers with the first it supports, so the order decides what most equipment picks. Always populated: a trunk with no explicit setting reports the default, ["SHA-256", "MD5"]. The list governs clients that authenticate with an API key: their answer with an algorithm that is not on it is rejected, so narrowing the list also narrows what the trunk accepts from them. Session credentials, which the dashboard phone uses and POST /v1/voice/session-credentials creates, are the exception: with workspace_users_enabled, the challenge always ends with an MD5 line, after the list in its own order, and a valid session credential is accepted with MD5 or SHA-256. An API-key answer with that extra MD5 is still rejected. Replace digest_algorithms through the trunk update operation.

session_credentials_enabled
boolean
required

Deprecated: read workspace_users_enabled, which has the same value.

media
object
required

How the trunk carries call audio. Set it through the trunk update operation.

Show child attributes
created_at
string
required
updated_at
string
required

Continue with the documentation, guides and examples for this topic.