Configure a phone number
update_phone_numberChange an owned number's routing and tags: link inbound calls to a voice application or SIP trunk, unlink either, or replace tags. Use on numbers already on the account.
Instructions
Change one owned phone number's configuration: replace its tags, link it to a voice application (inbound calls then fetch that application's answer_url) or to a SIP trunk (inbound calls are delivered through the trunk), or unlink either. A number can be linked to an application or a trunk, not both; unlinks run before links, so one call can switch. The number must already be on the account (see list_phone_numbers), otherwise not_found. To buy or release a number use buy_phone_number or release_phone_number. Returns the list of changes applied. Gated by VOBIZ_ENABLE_PROVISIONING and confirm: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Replaces the number's whole tag list (up to 20 tags of 1-50 characters); include every tag to keep. An empty array clears the tags. | |
| confirm | Yes | Must be true, set only after the user explicitly approved: changing this number's routing. If your client supports MCP elicitation, the server asks the user to approve directly and this flag is not relied on; otherwise it is your attestation that the user approved. | |
| trunk_id | No | SIP trunk (trunk_id from list_sip_trunks) that inbound calls to this number are routed through; sent to Vobiz as trunk_group_id. Not with unlink_trunk or application_id. | |
| phone_number | Yes | An owned number from list_phone_numbers, in E.164 form (e.g. +918065551234). | |
| unlink_trunk | No | true removes the number's SIP trunk link so inbound calls stop routing through it; reverses trunk_id. Not together with trunk_id. | |
| application_id | No | Application (app_id from list_applications) whose answer_url handles inbound calls to this number. Not with unlink_application or trunk_id. | |
| unlink_application | No | true removes the number's current application link; reverses application_id. Not together with application_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True on success. On a failure the result is isError with ok: false plus `error` (kind), `message`, `retryable` and sometimes `http_status`. | |
| changes | No | Human-readable list of the changes applied, in the order they ran. | |
| phone_number | No | The number that was changed, in E.164 form. |