Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
provision-phone-number
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/provision-phone-number \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+16045551234",
    "friendly_name": "Main Line",
    "agent_id": "550e8400-e29b-41d4-a716-446655440000"
  }'
{
  "id": "a1b2c3d4-5678-9012-3456-789012345678",
  "phone_number": "+16045551234",
  "friendly_name": "Main Line",
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "capabilities": {
    "voice": true,
    "sms": true,
    "mms": true
  },
  "is_active": true,
  "provider": "signalwire",
  "created_at": "2024-01-15T10:30:00Z"
}
Purchase an available phone number and add it to your account. Use the Search Numbers endpoint first to find available numbers.

Request Body

phone_number
string
required
The phone number to provision from search results.Example: +16045551234
friendly_name
string
Display name for the number.Example: Main Line
agent_id
string
Agent UUID to assign to this number immediately.

Response

Returns the provisioned phone number object.
id
string
Unique identifier for this phone number.
phone_number
string
The phone number in E.164 format.
friendly_name
string
Display name.
agent_id
string
Assigned agent UUID (if any).
capabilities
object
Number capabilities: voice, sms, mms.
is_active
boolean
Whether the number is active.
created_at
string
ISO 8601 timestamp when provisioned.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/provision-phone-number \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+16045551234",
    "friendly_name": "Main Line",
    "agent_id": "550e8400-e29b-41d4-a716-446655440000"
  }'
{
  "id": "a1b2c3d4-5678-9012-3456-789012345678",
  "phone_number": "+16045551234",
  "friendly_name": "Main Line",
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "capabilities": {
    "voice": true,
    "sms": true,
    "mms": true
  },
  "is_active": true,
  "provider": "signalwire",
  "created_at": "2024-01-15T10:30:00Z"
}