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
}
}
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
}
}
free or assigned.phone_numbers:read (all roles){
"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
}
}