# Update your Telephony setup

`POST /v1/provisioning/tenants/{tenant_id}/update`

Change your Telephony setup. An update replaces the whole config: an optional block you leave out is cleared. Read the current config from `sections.tenant.data` in Get your setup overview, keep only the fields listed below, change what you need, and send the whole config back here. Leave out `pbx.auth.password` to keep the stored trunk password.

## Auth

Authentication required.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| tenant_id | path | yes | string | Your setup ID — the `_id` returned by `GET /me`. |

## Request body

Required: yes
Content-Type: application/json
Shape: object { bot, pbx, transfer_targets, outbound, inbound, transfer_policy }

| Name | Type | Required | Description |
|---|---|---|---|
| bot | object | yes | Send `{}`. Which agent answers is set per number, when you bind an agent to it. |
| pbx | object | yes | Your trunk: where your PBX is and how it connects. |
| pbx.mode | enum(register \| ip) | no | `register`: we register to your PBX with a username and password. `ip` (Fixed IP): your PBX sends to us from the addresses in `source_ips`. |
| pbx.transport | enum(udp \| tls) | no | Default "udp". TLS is the only alternative to UDP; there is no TCP. |
| pbx.address | string | no | Your PBX as `host` or `host:port`, e.g. `pbx.example.com:5060`. |
| pbx.source_ips | array<string> | no | IP addresses or CIDR ranges your PBX sends from. Required for Fixed IP; send `[]` for register. |
| pbx.auth | object | no | Register mode only: how we sign in to your PBX. |
| pbx.auth.username | string | yes, if pbx.auth is sent | 1–64 characters. |
| pbx.auth.password | string (write-only) | no | Sent once and stored as a secret; never returned. Required when you create a register trunk; leave it out on update to keep the stored one. |
| pbx.auth.registrar | string | yes, if pbx.auth is sent | Where we register, as `host` or `host:port`. |
| pbx.auth.auth_username | string | no | Up to 64 characters. Optional. The identity your PBX answers the digest challenge with, when it is not `username`. |
| pbx.auth.expires | integer | no | 60–3600, default 3600. |
| transfer_targets | object | yes | Name → number for transfers your agents make by name. Send `{}` for none. |
| outbound | object \| null | yes | Outbound calling. `null` for an inbound-only setup. |
| outbound.enabled | boolean | no |  |
| outbound.default_path | enum(pbx \| pstn) | no | Which way calls leave: through your trunk or the phone network. |
| outbound.caller_id | object | no | The number calls present, per path. |
| outbound.caller_id.pbx | string | no |  |
| outbound.caller_id.pstn | string | no |  |
| inbound | object | yes | Limits on incoming calls. Send `{}` for the defaults. |
| inbound.limits | object | no |  |
| inbound.limits.max_concurrent_calls | integer | no | At least 1. |
| inbound.budget | object | no |  |
| inbound.budget.daily_minute_limit | integer | no | At least 1. |
| inbound.budget.daily_session_limit | integer | no | At least 1. |
| inbound.max_session_seconds | integer | no | At least 1. |
| transfer_policy | object \| null | no | Whether agents may transfer calls to outside numbers. |
| transfer_policy.external | object | no |  |
| transfer_policy.external.enabled | boolean | no |  |
| transfer_policy.external.destination_patterns | array<string> | no | Regular expressions an outside number must match. |

### Examples

#### Register trunk

```json
{
  "bot": {},
  "pbx": {
    "mode": "register",
    "transport": "udp",
    "address": "pbx.example.com:5060",
    "source_ips": [],
    "auth": {
      "username": "acme-trunk",
      "registrar": "pbx.example.com:5060"
    }
  },
  "transfer_targets": {},
  "outbound": null,
  "inbound": {}
}
```

#### Fixed IP trunk

```json
{
  "bot": {},
  "pbx": {
    "mode": "ip",
    "transport": "udp",
    "address": "pbx.example.com:5060",
    "source_ips": [
      "203.0.113.10"
    ]
  },
  "transfer_targets": {},
  "outbound": null,
  "inbound": {}
}
```

## Responses

| Status | Description | Content-Type | Shape |
|---|---|---|---|
| 200 | Successful Response | application/json | unknown |
| 422 | Validation Error | application/json | HTTPValidationError |

## Machine-readable

This page is also available as Markdown at `/docs/post-v1-provisioning-tenants-tenant_id-update.md` (the ".md" suffix convention). The full curated API contract is at `/api/openapi.json`, and a machine-readable index of every page is at `/llms.txt`.
