---
title: "Update Connection ID for a WhatsApp Calling BYON number"
method: PATCH
path: "/whatsapp/phone_numbers/{id}/calling_routing"
tags: ["Whatsapp Phone Numbers"]
---

# Update Connection ID for a WhatsApp Calling BYON number

`PATCH /whatsapp/phone_numbers/{id}/calling_routing`

## Request

- Base URL: `https://api.telnyx.com/v2`
- URL: `https://api.telnyx.com/v2/whatsapp/phone_numbers/{id}/calling_routing`
- Auth: HTTP bearer

Set or clear the connection ID for a WhatsApp Calling BYON (Bring Your Own Number) phone number: the connection that inbound WhatsApp calls to the number are delivered to.

The update is processed asynchronously. A `202` response means the request was accepted, not that the routing changed. Check the result with `GET /whatsapp/phone_numbers/{id}/calling_routing`, which can return the previous value immediately after an update. An update for a number that is not a WhatsApp Calling number in the account returns 404.

The connection must belong to the same account and must not be a WhatsApp connection. Send `connection_id: null` to clear the routing; omitting `connection_id` is rejected. Numbers active on Telnyx are rejected, because they route through their own connection assignment.

Sub-users need update permission on connections, and read permission to check the result with `GET`.

## Path parameters

- `id` string, required

## Request body

- WhatsappPatchCallingRoutingRequest
  - `connection_id` union, required: ID of the connection to deliver inbound WhatsApp calls to: a positive integer up to 9223372036854775807, sent as a decimal string or an integer. Send a string to keep large IDs exact. Non-null values are returned as strings. `null` clears the routing.
    - string
    - integer

## Response `202`

Update accepted for processing. The body echoes the requested routing; it does not confirm that the routing was applied.

- object
  - `data` WhatsappCallingRoutingData, required
    - `record_type` 'whatsapp_calling_routing', required: Identifies the type of the resource.
    - `phone_number` string, required: Phone number in E.164 format, with a leading `+`.
    - `connection_id` string, nullable, required: ID of the routing connection, or `null` when none is set.

## Other responses

- `403`: The caller is not permitted to perform this action. Sub-users need update permission on connections.
- `404`: The account has no WhatsApp Calling number with this phone number, or the requesting account could not be found. A number just enabled for WhatsApp Calling returns 404 until it is provisioned, so retry.
- `422`: Validation failed. Errors are keyed by field: `phone_number` when the number is not valid E.164 or is active on Telnyx, and `connection_id` when it is missing, is not a positive integer ID, is not a connection in the account, or is a WhatsApp connection.
- `503`: The update could not be confirmed as queued for processing, so it may or may not be applied. The request can be retried.
- `4XX`: Unexpected error

## Changes

> 152 revisions in range; 1 not diffed.

- **2026-10-15** `da303e40b51e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/changes/whatsapp/phone_numbers/:id/calling_routing/patch.md)

---

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