---
title: "Update Trunk"
method: PUT
path: "/core/trunks/{id}"
tags: ["Trunks"]
---

# Update Trunk

`PUT /core/trunks/{id}`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/trunks/{id}`
- Auth: HTTP bearer

Update a trunk.

## Path parameters

- `id` string, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- TrunkUpdateSchema: Schema for updating an existing trunk.
  - `name` string, nullable
  - `inbound_config` InboundTrunkConfigSchema: Schema for inbound trunk configuration.
    - `enable_noise_cancellation` boolean
    - `media_encryption` 'SIP_MEDIA_ENCRYPT_DISABLE' | 'SIP_MEDIA_ENCRYPT_ALLOW' | 'SIP_MEDIA_ENCRYPT_REQUIRE'
    - `allowed_addresses` string[], nullable
    - `caller_id_header` string, nullable
    - `header_metadata_mappings` object, nullable
  - `outbound_config` OutboundTrunkConfigSchema: Schema for outbound trunk configuration.
    - `address` string, required
    - `auth_username` string, required
    - `auth_password` string, required
    - `transport` 'SIP_TRANSPORT_UDP' | 'SIP_TRANSPORT_TCP' | 'SIP_TRANSPORT_TLS'
    - `media_encryption` 'SIP_MEDIA_ENCRYPT_DISABLE' | 'SIP_MEDIA_ENCRYPT_ALLOW' | 'SIP_MEDIA_ENCRYPT_REQUIRE'

## Response `200`

Successful Response

- Trunk: Trunk entity representing a SIP trunk configuration.
  - `id` string, required
  - `organization_id` string, required
  - `name` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `created_by` string, nullable
  - `modified_by` string, nullable
  - `inbound_config` InboundTrunkConfig: Inbound trunk configuration for SIP trunks.
    - `id` string, nullable
    - `enable_noise_cancellation` boolean
    - `media_encryption` 'SIP_MEDIA_ENCRYPT_DISABLE' | 'SIP_MEDIA_ENCRYPT_ALLOW' | 'SIP_MEDIA_ENCRYPT_REQUIRE'
    - `allowed_addresses` string[], nullable
    - `caller_id_header` string, nullable
    - `header_metadata_mappings` object, nullable
  - `outbound_config` OutboundTrunkConfig: Outbound trunk configuration for SIP trunks.
    - `id` string, required
    - `address` string, required
    - `auth_username` string, required
    - `auth_password` string, required
    - `transport` 'SIP_TRANSPORT_UDP' | 'SIP_TRANSPORT_TCP' | 'SIP_TRANSPORT_TLS'
    - `media_encryption` 'SIP_MEDIA_ENCRYPT_DISABLE' | 'SIP_MEDIA_ENCRYPT_ALLOW' | 'SIP_MEDIA_ENCRYPT_REQUIRE'
  - `managed_account_id` string, nullable
  - `external_id` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anyreach/apis/anyreach-api.md) - [All operations](https://skmtc.dev/anyreach/apis/anyreach-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anyreach/apis/anyreach-api/revisions/2eddf40c8c93?raw)
