Skip to navigation

Update Voice Routing

Route a number’s inbound calls.

method picks where calls to this number go:

  • "sip_trunk": deliver calls to one of your SIP trunks (sipTrunkId required). The number must be SIP-trunking eligible — see sipTrunkingEligible on the number response. iMessage numbers attach to a dedicated iMessage trunk (created with "provider": "imessage"; attaching is refused once a trunk already carries 100 numbers); other numbers attach to a standard trunk. With more than one number on a trunk, outbound calls over it must present one of the attached numbers as the caller ID.
  • "agent": restore hosted-agent answering (the number’s assigned agent).
  • "ignore": drop inbound calls (not available for iMessage numbers).

For iMessage numbers the change converges in the background: the response (and the number, on GET) carries voiceRouting.routingState "pending" until it is live — the field disappears once applied — or "error" with routingError when it could not be applied; re-sending the same request retries a stuck change. Other numbers apply immediately.

Authentication

AuthorizationBearer

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

Path parameters

number_idstringRequired

Headers

X-Sub-Account-IdstringOptional

Request

This endpoint expects an object.
methodenumRequired
Where inbound calls to this number go.
Allowed values:
sipTrunkIdstringOptional

Trunk to deliver calls to; required when method is “sip_trunk”.

Response

Successful Response
successboolean
voiceRoutingobject

Errors

422
Unprocessable Entity Error