Skip to main content
GET
/
api
/
phone-numbers
List Phone Numbers
curl --request GET \
  --url https://api.example.com/api/phone-numbers \
  --header 'X-API-Key: <x-api-key>' \
  --header 'X-Organization-Id: <x-organization-id>'
{
  "success": true,
  "data": [
    {
      "phone_number_id": "phon_a1b2c3d4e5f6",
      "phone_number": "+15551234567",
      "provider": "twilio",
      "status": "assigned",
      "supports_inbound": true,
      "supports_outbound": true,
      "assigned_agent_id": "agent_b2c3d4e5f6a7",
      "created_at": "2024-01-15T10:30:00Z"
    },
    {
      "phone_number_id": "phon_b2c3d4e5f6a7",
      "phone_number": "+15559876543",
      "provider": "sip",
      "status": "free",
      "supports_inbound": true,
      "supports_outbound": true,
      "assigned_agent_id": null,
      "created_at": "2024-01-10T09:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": null,
    "has_more": false,
    "page_size": 2,
    "total_count": 2
  }
}
List all phone numbers configured for your organization.

Headers

X-API-Key
string
required
Your API key for authentication.
X-Organization-Id
string
required
The organization ID.

Query Parameters

status
string
Filter by status: free or assigned.

Permissions

  • phone_numbers:read (all roles)

Response

success
boolean
Indicates if the request was successful.
data
array
List of phone number summary objects.
pagination
object
Pagination metadata.
{
  "success": true,
  "data": [
    {
      "phone_number_id": "phon_a1b2c3d4e5f6",
      "phone_number": "+15551234567",
      "provider": "twilio",
      "status": "assigned",
      "supports_inbound": true,
      "supports_outbound": true,
      "assigned_agent_id": "agent_b2c3d4e5f6a7",
      "created_at": "2024-01-15T10:30:00Z"
    },
    {
      "phone_number_id": "phon_b2c3d4e5f6a7",
      "phone_number": "+15559876543",
      "provider": "sip",
      "status": "free",
      "supports_inbound": true,
      "supports_outbound": true,
      "assigned_agent_id": null,
      "created_at": "2024-01-10T09:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": null,
    "has_more": false,
    "page_size": 2,
    "total_count": 2
  }
}