Agents
List Agent Phone Numbers
List the inbound and outbound phone numbers linked to a DialNexa agent.
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_idto 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
A200 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 Unauthorizedmeans the API key is missing or invalid.404 Not Foundmeans the agent does not exist in this workspace or was deleted.
Related endpoints
- Attach Agent Phone Number
- Detach Agent Phone Number
- Get Agent Phone Number History
- List Phone Numbers
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Agent ID from List Agents.
Example:
"agent_2g7Xy3tY53gRlp"