Skip to main content
GET
List Agent Phone Numbers
Read only List agent phone numbers to see which numbers ring an agent and which numbers it can call from. Phone numbers are linked to the agent, not to one of its versions, so every version uses the same numbers. Inbound calls run on the agent’s latest published version.

When to use this

  • Before an outbound call or batch: find the phone_number_id to send when the agent has more than one outbound number.
  • Routing audits: confirm which numbers answer with this agent.
  • Before a detach: get the ID and direction of the number to remove.

Before you begin

Get the agent ID from List Agents.

List agent phone numbers request

Verify the result

A 200 response contains data.inbound and data.outbound. Each holds up to three numbers with id, phone_number, country_iso, nickname, sip_trunk_enabled, and linked_at. An empty array means no number is linked in that direction. Get Agent Details returns the same lists as inbound_phone_numbers and outbound_phone_numbers.

Errors and recovery

  • 401 Unauthorized means the API key is missing or invalid.
  • 404 Not Found means the agent does not exist in this workspace or was deleted.
Reads are safe to retry.

Authorizations

Authorization
string
header
required

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

Path Parameters

agentId
string
required

Agent ID from List Agents.

Example:

"agent_2g7Xy3tY53gRlp"

Response

Successful response.

success
boolean
required
error
boolean
required
statusCode
integer
required
message
string
required
data
object
required
timestamp
string<date-time>
required