Skip to content
vocapable.Docs

List the phone numbers attached to each agent

GET
/v1/agent-phone-numbers
curl --request GET \
--url https://api.vocapable.com/v1/agent-phone-numbers \
--header 'Authorization: Bearer <token>'

Every number each agent answers or dials from, and how it is attached.

One read for the whole agent directory, so a list of agent cards never needs one request per number or per policy. Numbers on their way out of service are left out, and so are campaigns that can no longer dial. See AgentPhoneAttachmentKind for the four kinds.

Successful Response

Media typeapplication/json
AgentPhoneNumbersList

Every agent of this tenant with at least one attached number.

An agent absent from data has no number attached in any of the four ways. Not paginated: the response is bounded by the numbers the tenant holds.

object
data
required
Data
Array<object>
AgentPhoneNumbers
object
agent_id
required
Agent Id
string
numbers
required
Numbers
Array<object>
AgentPhoneAttachment

One number attached to one agent, and how it is attached.

A number attached in several ways (say, one policy step and one caller-ID pool) appears once per kind, so a reader never has to guess which relationship a row describes.

object
phone_number_id
required
Phone Number Id
string
phone_e164
required
Phone E164
string
number_status
required
Number Status
string
Allowed values: provisioning active quarantined resting releasing released
kind
required
Kind
string
Allowed values: inbound_agent inbound_voicemail answering_policy campaign_caller_id
policy_hours
Any of:
string
Allowed values: always open_hours closed_hours
number_pool_id
Any of:
string
number_pool_name
Any of:
string
campaign_ids
Campaign Ids
Array<string>
Example
{
"data": [
{
"numbers": [
{
"number_status": "provisioning",
"kind": "inbound_agent",
"policy_hours": "always"
}
]
}
]
}