Skip to main content
GET
/
user
/
phone-numbers
/
all
Получаване на всички телефонни номера
curl --request GET \
  --url https://call.aiployees.com/api/user/phone-numbers/all \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": 1,
      "phone_number": "+14155551234",
      "country_code": "US",
      "type": "normal",
      "type_label": "Dedicated Number",
      "sms_capable": true,
      "region": "us1",
      "has_active_subscription": true,
      "created_at": "2025-01-08T10:30:00.000000Z"
    },
    {
      "id": 2,
      "phone_number": "+442071234567",
      "country_code": "GB",
      "type": "normal",
      "type_label": "Dedicated Number",
      "sms_capable": false,
      "region": "us1",
      "has_active_subscription": true,
      "created_at": "2025-01-05T14:20:00.000000Z"
    }
  ]
}
Този endpoint връща списък от всички телефонни номера, свързани с вашия акаунт, включително техния статус на абонамент и възможности.

Отговор

data
array
Масив от обекти с телефонни номера
{
  "data": [
    {
      "id": 1,
      "phone_number": "+14155551234",
      "country_code": "US",
      "type": "normal",
      "type_label": "Dedicated Number",
      "sms_capable": true,
      "region": "us1",
      "has_active_subscription": true,
      "created_at": "2025-01-08T10:30:00.000000Z"
    },
    {
      "id": 2,
      "phone_number": "+442071234567",
      "country_code": "GB",
      "type": "normal",
      "type_label": "Dedicated Number",
      "sms_capable": false,
      "region": "us1",
      "has_active_subscription": true,
      "created_at": "2025-01-05T14:20:00.000000Z"
    }
  ]
}
Съществува също наследен endpoint GET /user/phone-numbers, който връща само SMS-способни телефонни номера с активни абонаменти. Използвайте този /all endpoint, ако имате нужда от всички телефонни номера независимо от SMS възможността или статуса на абонамента.