Skip to main content
GET
/
v1
/
sms
/
phone-numbers
List SMS Numbers
curl --request GET \
  --url https://api.example.com/v1/sms/phone-numbers \
  --header 'X-API-Key: <x-api-key>'
{
  "success": true,
  "phone_numbers": [
    {}
  ],
  "count": 123
}

List SMS Numbers

Retrieve all SMS phone numbers belonging to an organization, including their assignment status.

Authentication

X-API-Key
string
required
Your API key

Query Parameters

organization_id
string
required
The organization’s unique_id
include_assigned
boolean
default:"true"
If false, only returns unassigned numbers (available pool)

Response

success
boolean
Whether the request was successful
phone_numbers
array
List of phone number objects
count
integer
Total count of phone numbers returned

Phone Number Object

FieldTypeDescription
idstringUUID of the phone record
phone_numberstringE.164 format (+15551234567)
pretty_phone_numberstringFormatted for display
nicknamestringFriendly name (if set)
is_availablebooleanTrue if unassigned
assigned_toobjectUser info if assigned
assigned_atstringISO timestamp of assignment
created_atstringISO timestamp of creation

Example Request

curl -X GET "https://api.teli.ai/v1/sms/phone-numbers?organization_id=org_abc123" \
  -H "X-API-Key: your-api-key"

Example Response

{
  "success": true,
  "phone_numbers": [
    {
      "id": "6d7f8580-2c18-4ca9-8917-c9ca121a2c49",
      "phone_number": "+14155551234",
      "pretty_phone_number": "+1 415-555-1234",
      "nickname": "Sales Line",
      "is_available": false,
      "assigned_to": {
        "user_id": "user_xyz789",
        "email": "john@company.com",
        "name": "John Smith"
      },
      "assigned_at": "2024-01-15T10:30:00Z",
      "created_at": "2024-01-10T09:00:00Z"
    },
    {
      "id": "8a2b3c4d-5e6f-7890-abcd-ef1234567890",
      "phone_number": "+14155555678",
      "pretty_phone_number": "+1 415-555-5678",
      "nickname": null,
      "is_available": true,
      "assigned_to": null,
      "assigned_at": null,
      "created_at": "2024-01-12T14:00:00Z"
    }
  ],
  "count": 2,
  "powered_by": "Teli"
}

Get Only Available Numbers

To see only unassigned numbers:
curl -X GET "https://api.teli.ai/v1/sms/phone-numbers?organization_id=org_abc123&include_assigned=false" \
  -H "X-API-Key: your-api-key"
Or use the dedicated endpoint:
curl -X GET "https://api.teli.ai/v1/sms/phone-numbers/available?organization_id=org_abc123" \
  -H "X-API-Key: your-api-key"