Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
list-phone-numbers
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/list-phone-numbers \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "numbers": [
    {
      "id": "a1b2c3d4-5678-9012-3456-789012345678",
      "phone_number": "+16045551234",
      "friendly_name": "Main Line",
      "agent_id": "550e8400-e29b-41d4-a716-446655440000",
      "agent_name": "Sarah - Receptionist",
      "capabilities": {
        "voice": true,
        "sms": true,
        "mms": true
      },
      "is_active": true,
      "created_at": "2024-01-10T10:00:00Z"
    },
    {
      "id": "b2c3d4e5-6789-0123-4567-890123456789",
      "phone_number": "+16045559999",
      "friendly_name": "Support Line",
      "agent_id": null,
      "agent_name": null,
      "capabilities": {
        "voice": true,
        "sms": true,
        "mms": false
      },
      "is_active": true,
      "created_at": "2024-01-12T14:00:00Z"
    }
  ],
  "total": 2
}
Retrieve all phone numbers provisioned in your account with their current configuration.

Request Body

limit
integer
default:50
Maximum numbers to return. Max: 100.
offset
integer
default:0
Number of records to skip for pagination.
agent_id
string
Filter by assigned agent UUID.
is_active
boolean
Filter by active status.

Response

numbers
array
Array of phone number objects.
total
integer
Total number of phone numbers in account.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/list-phone-numbers \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "numbers": [
    {
      "id": "a1b2c3d4-5678-9012-3456-789012345678",
      "phone_number": "+16045551234",
      "friendly_name": "Main Line",
      "agent_id": "550e8400-e29b-41d4-a716-446655440000",
      "agent_name": "Sarah - Receptionist",
      "capabilities": {
        "voice": true,
        "sms": true,
        "mms": true
      },
      "is_active": true,
      "created_at": "2024-01-10T10:00:00Z"
    },
    {
      "id": "b2c3d4e5-6789-0123-4567-890123456789",
      "phone_number": "+16045559999",
      "friendly_name": "Support Line",
      "agent_id": null,
      "agent_name": null,
      "capabilities": {
        "voice": true,
        "sms": true,
        "mms": false
      },
      "is_active": true,
      "created_at": "2024-01-12T14:00:00Z"
    }
  ],
  "total": 2
}