Skip to main content
PATCH
Update a phone number
Legacy endpoint - deprecated. Unversioned endpoints are scheduled for removal on July 31, 2026. There is no public /v1 replacement documented for updating a phone number yet. Keep existing integrations on this endpoint until DialNexa publishes a replacement.
Updates editable fields on a phone number provisioned on your workspace. The most common change is assigning or replacing the inbound agent; you can also set or clear the display nickname so the number is easier to identify in dashboard selectors. Only the fields you include are updated, omitted fields keep their current values. This endpoint does not change the underlying carrier configuration, the E.164 number itself, or the monthly billing.

When to use this

  • Assigning an agent for the first time after purchasing the number through Buy a Phone Number.
  • Switching the inbound agent when handing the number to a different team or workflow.
  • Renaming for clarity: set a nickname so dashboard users can pick the right number out of a long list.
  • Detaching routing: pass agent_id: null to stop routing inbound calls without releasing the number. Useful while you investigate an issue or while the new agent is being prepared.
To release the number entirely, use Release a Number instead.

Path parameters

Errors

  • 404 Not Found is returned when the phone number does not exist on this workspace.
  • 400 Bad Request is returned when the supplied agent_id does not exist or is not eligible to be assigned to a number.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-organization-id
string
required

RSA-encrypted organization_id string (base64 format)

Path Parameters

id
string
required

Body

application/json
country_iso
string

Country calling code digits only (e.g. "91" for India, "1" for US); stored as VARCHAR(3)

Example:

"91"

phone_number
number

Phone number assigned to organization (without country code)

Example:

1234567890

telephony_provider_id
string

ID of telephony provider (14-char string)

Example:

"prov_xxxxxx"

status
enum<string>

Status of the phone number

Available options:
pending,
active
Example:

"active"

inbound_agent_id
string

Inbound agent ID

Example:

"A1B2C3D4E5F6G7"

outbound_agent_id
string

Outbound agent ID

Example:

"B1C2D3E4F5G6H7"

inbound_agent_version_number
number

Inbound agent version number

Example:

1

outbound_agent_version_number
number

Outbound agent version number

Example:

2

sip_trunk_enabled
boolean
default:false

When true, Speech IO uses SIP trunking (e.g. asterisk) for this number.

rental_start_date
string

Rental start date in YYYY-MM-DD format

Example:

"2026-04-07"

rental_end_date
string

Rental end date in YYYY-MM-DD format

Example:

"2026-05-07"

rental_status
enum<string>

Rental lifecycle status for this phone number

Available options:
active,
expired,
available_for_reassignment
Example:

"active"

nickname
string

Human-readable nickname for this phone number

Example:

"Sales Line"

Response

Phone number updated.

sip_trunk_enabled
boolean
default:false
required

When true, Speech IO uses SIP trunking (e.g. asterisk) for this number.