On this page
trunks.update
Update a BYOC SIP trunk
Request
PATCH /api/v1/telephony/trunks/{trunk_id}
- MCP:
trunks_update - SDK:
client.trunks.update(SDK path arguments usepath; MCP usesparams). - Minimum API key role: admin.
- Idempotency: natural.
Use the request schema below. Read IDs from earlier operation results.
Input schema
json
{
"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
json
{
"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
json
{
"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"
}
},
"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": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"nullable": true
},
"auth_secret": {
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"version": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"id",
"version"
],
"additionalProperties": false
}
],
"nullable": true
},
"inbound": {
"type": "boolean"
},
"inbound_sip_uri": {
"type": "string",
"maxLength": 1024,
"nullable": true
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"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.
Related guides
Content version f2a523e8Markdown source