On this page
Update a SIP trunk
Change a connected SIP trunk’s settings.
Operation ID: trunks.update.
Request
PATCH /api/v1/telephony/trunks/{trunk_id}
- TypeScript SDK:
client.trunks.update(path arguments usepath). - MCP tool:
sdk_client_callwithoperationId: "trunks.update"(path arguments useinput.path). Legacy alias:trunks_update. Connect to your authenticated/mcpendpoint with an API key for the same environment. - Minimum API key role: admin.
- Idempotency: No header required; the resource or revision identifies the change.
Read resource IDs from earlier responses and use a key for the same environment.
Request example
Use the trunk_id returned by trunks.create or trunks.list. Enable inbound only when LiveKit inbound provisioning is configured and the carrier’s inbound route is ready; inspect the trunk status afterward. Omitted fields retain their current values.
Set CUMULUS_BASE_URL to your workspace API URL and CUMULUS_API_KEY to a key for that environment. Example values are synthetic.
cURL
curl --fail-with-body -sS -X PATCH "${CUMULUS_BASE_URL%/}/api/v1/telephony/trunks/${TRUNK_ID}" \
-H "Authorization: Bearer $CUMULUS_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"name": "Service desk carrier — inbound enabled",
"inbound": true
}'
TypeScript
import { Cumulus } from "@cumulus/sdk";
const baseUrl = process.env.CUMULUS_BASE_URL;
const apiKey = process.env.CUMULUS_API_KEY;
if (!baseUrl || !apiKey) throw new Error("Set CUMULUS_BASE_URL and CUMULUS_API_KEY");
const client = new Cumulus({ baseUrl, apiKey });
const response = await client.trunks.update({
"path": {
"trunk_id": "<trunk_id>"
},
"body": {
"name": "Service desk carrier — inbound enabled",
"inbound": true
}
});
Input schema
Path, query and header parameters
trunk_id
path parameter · Required.
Type: string. minLength: 1. maxLength: 128.
JSON request body
| Field | Type or values | Required | Description and limits |
|---|---|---|---|
name | string | Optional | minLength: 1. maxLength: 256. |
termination_uri | string | Optional | minLength: 1. maxLength: 253. pattern: ^a-z0-9?$. |
auth_username | string | Optional | minLength: 1. maxLength: 256. |
auth_secret | object | Optional | — |
auth_secret.id | string | Required | minLength: 1. maxLength: 128. |
auth_secret.version | string | Required | minLength: 1. maxLength: 128. |
inbound | boolean | Optional | — |
transfer_caller_id | "from-transferee" · "from-transferor" | Optional | Declared Twilio trunk transfer caller ID. Configure the same mode in Twilio before saving; this API does not update Twilio. Transfer nodes must agree. Change only after draining voice calls. |
Complete OpenAPI schema
{
"parameters": [
{
"name": "trunk_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TrunksUpdateRequest"
}
}
}
}
}
Responses
HTTP 200
Update a BYOC SIP trunk
application/json
| Field | Type or values | Required | Description and limits |
|---|---|---|---|
trunk_id | string | Required | minLength: 1. maxLength: 128. pattern: ^[a-z0-9][a-z0-9_-]*$. |
name | string | Required | minLength: 1. maxLength: 256. |
provider | "twilio_elastic_sip" · "generic_sip" | Required | — |
termination_uri | string | Required | minLength: 1. maxLength: 253. pattern: ^a-z0-9?$. |
auth_username | string or null | Required | minLength: 1. maxLength: 256. |
auth_secret | object or null | Required | — |
auth_secret.id | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
auth_secret.version | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
inbound | boolean | Required | — |
transfer_caller_id | "from-transferee" · "from-transferor" | Optional | Declared Twilio trunk transfer caller ID. Configure the same mode in Twilio before saving; this API does not update Twilio. Transfer nodes must agree. Change only after draining voice calls. |
inbound_sip_uri | string or null | Optional | maxLength: 1024. |
created_at | string (date-time) | Required | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$. |
updated_at | string (date-time) | Required | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$. |
Error responses
| HTTP | Description |
|---|---|
| 4XX | Typed error (ApiError) |
| 5XX | Typed error (ApiError) |
Errors use the shared error envelope. Inspect error.code, retryable, outcome and details before retrying.
Complete OpenAPI schema
{
"200": {
"description": "Update a BYOC SIP trunk",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ByocTrunk"
}
}
}
},
"4XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
Referenced schemas
Expand the complete OpenAPI definitions for integrations that generate their own clients.
Complete OpenAPI schema
{
"components": {
"schemas": {
"TrunksUpdateRequest": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"termination_uri": {
"type": "string",
"minLength": 1,
"maxLength": 253,
"pattern": "^[a-z0-9](?:[a-z0-9.-]{0,251}[a-z0-9])?$"
},
"auth_username": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"auth_secret": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"version": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"id",
"version"
],
"additionalProperties": false
},
"inbound": {
"type": "boolean"
},
"transfer_caller_id": {
"type": "string",
"enum": [
"from-transferee",
"from-transferor"
],
"description": "Declared Twilio trunk transfer caller ID. Configure the same mode in Twilio before saving; this API does not update Twilio. Transfer nodes must agree. Change only after draining voice calls."
}
},
"additionalProperties": false
},
"ByocTrunk": {
"type": "object",
"properties": {
"trunk_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-z0-9][a-z0-9_-]*$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"provider": {
"type": "string",
"enum": [
"twilio_elastic_sip",
"generic_sip"
]
},
"termination_uri": {
"type": "string",
"minLength": 1,
"maxLength": 253,
"pattern": "^[a-z0-9](?:[a-z0-9.-]{0,251}[a-z0-9])?$"
},
"auth_username": {
"nullable": true,
"type": "string",
"minLength": 1,
"maxLength": 256
},
"auth_secret": {
"nullable": true,
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"version": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"id",
"version"
],
"additionalProperties": false
},
"inbound": {
"type": "boolean"
},
"transfer_caller_id": {
"type": "string",
"enum": [
"from-transferee",
"from-transferor"
],
"description": "Declared Twilio trunk transfer caller ID. Configure the same mode in Twilio before saving; this API does not update Twilio. Transfer nodes must agree. Change only after draining voice calls."
},
"inbound_sip_uri": {
"nullable": true,
"type": "string",
"maxLength": 1024
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"trunk_id",
"name",
"provider",
"termination_uri",
"auth_username",
"auth_secret",
"inbound",
"created_at",
"updated_at"
],
"additionalProperties": false
},
"ApiError": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthenticated",
"forbidden",
"not_found",
"conflict",
"invalid_request",
"idempotency_conflict",
"policy_denied",
"capability_unavailable",
"provider_unavailable",
"knowledge_unavailable",
"publication_invalid",
"run_not_active",
"rate_limited",
"outcome_unknown",
"internal"
]
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"outcome": {
"type": "string",
"enum": [
"none",
"unknown"
]
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"code",
"message",
"retryable",
"outcome"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
}
Errors and recovery
See API error handling and Troubleshooting.