SMS-ActSMS·Act
СервисыПополнитьИнструкцияДокументацияAPI
ВойтиВойти / Регистрация
SMS·Act

Арендуйте реальные номера в 160+ странах и регионах для 600+ сервисов. Оплата только за полученные коды — без подписок и минимумов.

Сервисы
  • Сервисы
  • Тарифы
  • Инструкция
  • API для разработчиков
  • Документация
Правовая информация и поддержка
  • О платформе
  • Инструкция и правила
  • Условия использования
  • Политика конфиденциальности
  • Контакты

© 2023-2026 SMS-Act Ведущая в мире онлайн-платформа SMS-верификации

Страны/регионы · Сервисы

API для разработчиков

SMS-Act API

Заказывайте номера, получайте коды подтверждения и оформляйте возвраты из своего кода. Компактный REST API с предсказуемыми ошибками.

Получить ключ доступаСкачать спецификацию OpenAPI

На этой странице

  • Быстрый старт
  • Полный пример
  • Аутентификация
  • Общие правила
  • Методы
  • Объекты
  • Коды ошибок

Быстрый старт

  1. 1Создайте ключ доступа на вкладке «API» в аккаунте и храните его на своём сервере.
  2. 2Выберите сервис и страну через GET /services и GET /services/{service}/countries.
  3. 3Закажите номер через POST /activations, затем опрашивайте GET /activations/{id}, пока status не станет completed, и прочитайте code.
  4. 4Код не приходит? Отмените заказ через POST /activations/{id}/cancel с полным возвратом или дождитесь его истечения.

Полный пример

Заказывает номер, каждые 5 секунд проверяет статус и выводит код. Если код не пришёл за 10 минут, отменяет активацию с возвратом средств. Укажите ключ доступа в переменной окружения SMS_ACT_KEY и запустите.

pip install requests
SMS_ACT_KEY=your_key python sms_act_example.py
import os
import time
import uuid

import requests

BASE_URL = "https://sms-act.net/sms/open-api/v1"
SESSION = requests.Session()
SESSION.headers["X-Access-Key"] = os.environ["SMS_ACT_KEY"]


def call(method, path, **kwargs):
    resp = SESSION.request(method, BASE_URL + path, timeout=30, **kwargs)
    body = resp.json()
    if resp.status_code >= 400:
        err = body["error"]
        raise RuntimeError(f"{err['code']}: {err['message']} (requestId={err['requestId']})")
    return body["data"]


# 1. Order a number. The Idempotency-Key makes network retries safe.
activation = call(
    "POST",
    "/activations",
    json={"service": "wa", "countryId": 6},
    headers={"Idempotency-Key": str(uuid.uuid4())},
)
print("Phone number:", activation["phoneNumber"])

# 2. Poll every 5 seconds until the code arrives (or give up after 10 minutes).
deadline = time.time() + 10 * 60
while activation["status"] == "waiting" and time.time() < deadline:
    time.sleep(5)
    activation = call("GET", f"/activations/{activation['id']}")

# 3. No code in time: cancel for a full refund.
if activation["status"] == "waiting":
    try:
        activation = call("POST", f"/activations/{activation['id']}/cancel")
    except RuntimeError:
        # The code may have arrived just before cancelling; read the final state.
        activation = call("GET", f"/activations/{activation['id']}")

if activation["status"] == "completed":
    print("Code:", activation["code"])
else:
    print("No code received; the activation was cancelled and refunded.")
# Node.js 18+
SMS_ACT_KEY=your_key node sms_act_example.mjs
import { randomUUID } from "node:crypto";

const BASE_URL = "https://sms-act.net/sms/open-api/v1";
const ACCESS_KEY = process.env.SMS_ACT_KEY;
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

async function call(method, path, { body, headers = {} } = {}) {
  const resp = await fetch(BASE_URL + path, {
    method,
    headers: { "X-Access-Key": ACCESS_KEY, "Content-Type": "application/json", ...headers },
    body: body ? JSON.stringify(body) : undefined,
  });
  const json = await resp.json();
  if (!resp.ok) {
    const { code, message, requestId } = json.error;
    throw new Error(`${code}: ${message} (requestId=${requestId})`);
  }
  return json.data;
}

// 1. Order a number. The Idempotency-Key makes network retries safe.
let activation = await call("POST", "/activations", {
  body: { service: "wa", countryId: 6 },
  headers: { "Idempotency-Key": randomUUID() },
});
console.log("Phone number:", activation.phoneNumber);

// 2. Poll every 5 seconds until the code arrives (or give up after 10 minutes).
const deadline = Date.now() + 10 * 60 * 1000;
while (activation.status === "waiting" && Date.now() < deadline) {
  await sleep(5000);
  activation = await call("GET", `/activations/${activation.id}`);
}

// 3. No code in time: cancel for a full refund.
if (activation.status === "waiting") {
  try {
    activation = await call("POST", `/activations/${activation.id}/cancel`);
  } catch {
    // The code may have arrived just before cancelling; read the final state.
    activation = await call("GET", `/activations/${activation.id}`);
  }
}

if (activation.status === "completed") {
  console.log("Code:", activation.code);
} else {
  console.log("No code received; the activation was cancelled and refunded.");
}

Аутентификация

Передавайте ключ доступа в заголовке X-Access-Key в каждом запросе, кроме /health. Любой, у кого есть ключ, может тратить ваш баланс, поэтому никогда его не раскрывайте. При утечке сразу замените ключ в аккаунте.

Базовый URL

https://sms-act.net/sms/open-api/v1

Общие правила

Ответы

Успешные ответы возвращают HTTP 2xx, данные — в поле data. Ошибки возвращают HTTP 4xx или 5xx с объектом error: code, message, requestId и необязательные details.

Обработка ошибок

Определяйте ошибку по error.code, а не по message. При обращении в поддержку укажите requestId (он также есть в заголовке X-Request-Id).

Жизненный цикл заказа

Заказ начинается в статусе waiting, становится completed после получения кода или cancelled, если вы его отменили или он автоматически отменён из-за отсутствия кода (обычно примерно через 15 минут, самое позднее в expiresAt — через 20 минут после создания). Отменённые заказы всегда возвращаются полностью.

Опрос

Опрашивайте GET /activations/{id} не чаще раза в 3 секунды. Более частые запросы не вызывают ошибку, но возвращают последнее известное состояние.

Идемпотентность

Передавайте заголовок Idempotency-Key (например, UUID) в POST /activations. Повтор с тем же значением в течение 24 часов вернёт исходный заказ без повторного списания.

Лимиты запросов

Для каждого ключа — до 60 запросов за 10 секунд. При превышении возвращается 429 RATE_LIMITED с заголовком Retry-After. Неудачная аутентификация тоже ограничена по IP: после примерно 20 неудачных попыток за минуту все запросы с этого IP (даже с действительным ключом) получают 429 до конца этой минуты.

Одновременные заказы и дневной лимит неудач

Одновременно в статусе waiting может быть не более 3 активаций (заказы, сделанные на сайте, тоже считаются). При превышении POST /activations возвращает 409 PENDING_LIMIT_REACHED — дождитесь завершения одной из них или отмените её. Когда за день набирается 15 неудачных активаций (отмена и автоматическое истечение тоже считаются), а доля успешных за день ниже 10%, заказывать до следующего дня нельзя (403 ACTIVATIONS_RESTRICTED). Для нового аккаунта, который ни разу не получал код, это значит не более 14 неудач в день. При интеграции не заказывайте и не отменяйте подряд.

Баланс

Для заказа нужен минимальный баланс — поле minBalanceToOrder в GET /account/balance. При низком балансе остальные методы продолжают работать.

Форматы

ID заказов — строки, время — в формате RFC 3339 (UTC), цены — в кредитах. Списки принимают page и pageSize (1–100) и возвращают pagination.

Методы

Описания методов и полей взяты из спецификации OpenAPI и приведены на английском.

Get account balance

GET/account/balance

Ответы

data: Balance

  • 200Current balance.
  • 401UNAUTHORIZED — missing, invalid or revoked Access Key.
  • 403ACCOUNT_SUSPENDED. POST /activations may also return DAILY_LIMIT_REACHED (details.failedToday, details.blockThreshold) or ACTIVATIONS_RESTRICTED.
  • 429RATE_LIMITED — wait Retry-After seconds.
  • 500INTERNAL_ERROR — unexpected server error. Nothing was charged and it is safe to retry (use the same Idempotency-Key for POST /activations).

Пример запроса

curl -X GET "https://sms-act.net/sms/open-api/v1/account/balance" \
  -H "X-Access-Key: $SMS_ACT_KEY"

Пример ответа

{
  "data": {
    "balance": 92,
    "currency": "credits",
    "minBalanceToOrder": 60
  }
}

List services that can be ordered

GET/services

Параметры

  • pageintegerquery

    (≥ 1, default 1)

  • pageSizeintegerquery

    (1–100, default 20)

  • qstringquery

    Case-insensitive search on service code or name. (max length 50)

ИмяГдеТипОбязательныйОписание
pagequeryintegerНет(≥ 1, default 1)
pageSizequeryintegerНет(1–100, default 20)
qquerystringНетCase-insensitive search on service code or name. (max length 50)

Ответы

data: Service[] + pagination

  • 200A page of services.
  • 400INVALID_REQUEST — a parameter is missing or malformed (details.field).
  • 401UNAUTHORIZED — missing, invalid or revoked Access Key.
  • 403ACCOUNT_SUSPENDED. POST /activations may also return DAILY_LIMIT_REACHED (details.failedToday, details.blockThreshold) or ACTIVATIONS_RESTRICTED.
  • 429RATE_LIMITED — wait Retry-After seconds.
  • 500INTERNAL_ERROR — unexpected server error. Nothing was charged and it is safe to retry (use the same Idempotency-Key for POST /activations).

Пример запроса

curl -X GET "https://sms-act.net/sms/open-api/v1/services" \
  -H "X-Access-Key: $SMS_ACT_KEY"

Пример ответа

{
  "data": [
    {
      "code": "wa",
      "name": "Whatsapp"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 20,
    "total": 1
  }
}

List countries

GET/countries

Параметры

  • pageintegerquery

    (≥ 1, default 1)

  • pageSizeintegerquery

    (1–100, default 20)

  • qstringquery

    Case-insensitive search on English name or ISO code. (max length 50)

ИмяГдеТипОбязательныйОписание
pagequeryintegerНет(≥ 1, default 1)
pageSizequeryintegerНет(1–100, default 20)
qquerystringНетCase-insensitive search on English name or ISO code. (max length 50)

Ответы

data: Country[] + pagination

  • 200A page of countries.
  • 400INVALID_REQUEST — a parameter is missing or malformed (details.field).
  • 401UNAUTHORIZED — missing, invalid or revoked Access Key.
  • 403ACCOUNT_SUSPENDED. POST /activations may also return DAILY_LIMIT_REACHED (details.failedToday, details.blockThreshold) or ACTIVATIONS_RESTRICTED.
  • 429RATE_LIMITED — wait Retry-After seconds.
  • 500INTERNAL_ERROR — unexpected server error. Nothing was charged and it is safe to retry (use the same Idempotency-Key for POST /activations).

Пример запроса

curl -X GET "https://sms-act.net/sms/open-api/v1/countries" \
  -H "X-Access-Key: $SMS_ACT_KEY"

Пример ответа

{
  "data": [
    {
      "id": 6,
      "iso2": "ID",
      "name": "Indonesia"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 20,
    "total": 1
  }
}

List countries where a service can be ordered

GET/services/{service}/countries

Includes the price and a best-effort availability hint. Not paginated.

Параметры

  • servicestringОбязательныйpath
ИмяГдеТипОбязательныйОписание
servicepathstringДа

Ответы

data: ServiceCountry[]

  • 200Orderable countries for the service.
  • 401UNAUTHORIZED — missing, invalid or revoked Access Key.
  • 403ACCOUNT_SUSPENDED. POST /activations may also return DAILY_LIMIT_REACHED (details.failedToday, details.blockThreshold) or ACTIVATIONS_RESTRICTED.
  • 404ACTIVATION_NOT_FOUND or NOT_FOUND.
  • 429RATE_LIMITED — wait Retry-After seconds.
  • 500INTERNAL_ERROR — unexpected server error. Nothing was charged and it is safe to retry (use the same Idempotency-Key for POST /activations).

Пример запроса

curl -X GET "https://sms-act.net/sms/open-api/v1/services/wa/countries" \
  -H "X-Access-Key: $SMS_ACT_KEY"

Пример ответа

{
  "data": [
    {
      "countryId": 6,
      "iso2": "ID",
      "countryName": "Indonesia",
      "price": {
        "amount": 8,
        "currency": "credits"
      },
      "available": true
    }
  ]
}

List activations created through the API

GET/activations

Параметры

  • pageintegerquery

    (≥ 1, default 1)

  • pageSizeintegerquery

    (1–100, default 20)

  • status"waiting" | "completed" | "cancelled"query
ИмяГдеТипОбязательныйОписание
pagequeryintegerНет(≥ 1, default 1)
pageSizequeryintegerНет(1–100, default 20)
statusquery"waiting" | "completed" | "cancelled"Нет

Ответы

data: Activation[] + pagination

  • 200A page of activations, newest first.
  • 400INVALID_REQUEST — a parameter is missing or malformed (details.field).
  • 401UNAUTHORIZED — missing, invalid or revoked Access Key.
  • 403ACCOUNT_SUSPENDED. POST /activations may also return DAILY_LIMIT_REACHED (details.failedToday, details.blockThreshold) or ACTIVATIONS_RESTRICTED.
  • 429RATE_LIMITED — wait Retry-After seconds.
  • 500INTERNAL_ERROR — unexpected server error. Nothing was charged and it is safe to retry (use the same Idempotency-Key for POST /activations).

Пример запроса

curl -X GET "https://sms-act.net/sms/open-api/v1/activations" \
  -H "X-Access-Key: $SMS_ACT_KEY"

Пример ответа

{
  "data": [
    {
      "id": "2348810953",
      "status": "completed",
      "service": "wa",
      "serviceName": "Whatsapp",
      "countryId": 6,
      "countryName": "Indonesia",
      "phoneNumber": "+6281234567890",
      "code": "482915",
      "price": {
        "amount": 8,
        "currency": "credits"
      },
      "createdAt": "2026-10-08T09:30:00Z",
      "expiresAt": "2026-10-08T09:50:00Z",
      "completedAt": "2026-10-08T09:31:12Z",
      "cancelledAt": null
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 20,
    "total": 1
  }
}

Order a phone number

POST/activations

Charges price.amount credits. Nothing is charged if the request fails.

Параметры

  • Idempotency-Keystringheader

    Strongly recommended. Replaying the same key within 24 hours returns the original activation instead of ordering again. (max length 64)

ИмяГдеТипОбязательныйОписание
Idempotency-KeyheaderstringНетStrongly recommended. Replaying the same key within 24 hours returns the original activation instead of ordering again. (max length 64)

Тело запроса

  • servicestringОбязательный
  • countryIdintegerОбязательный

    (≥ 0)

ИмяТипОбязательныйОписание
servicestringДа
countryIdintegerДа(≥ 0)

Ответы

data: ActivationCreated

  • 200Idempotent replay — the activation created by an earlier request with the same Idempotency-Key.
  • 201Activation created.
  • 400INVALID_REQUEST — a parameter is missing or malformed (details.field).
  • 401UNAUTHORIZED — missing, invalid or revoked Access Key.
  • 402INSUFFICIENT_BALANCE — details.balance, details.required.
  • 403ACCOUNT_SUSPENDED. POST /activations may also return DAILY_LIMIT_REACHED (details.failedToday, details.blockThreshold) or ACTIVATIONS_RESTRICTED.
  • 409NO_NUMBERS_AVAILABLE, PENDING_LIMIT_REACHED (details.pending, details.limit), ACTIVATION_NOT_CANCELLABLE or IDEMPOTENCY_IN_PROGRESS.
  • 422UNSUPPORTED_SERVICE_COUNTRY or IDEMPOTENCY_KEY_REUSED.
  • 429RATE_LIMITED — wait Retry-After seconds.
  • 500INTERNAL_ERROR — unexpected server error. Nothing was charged and it is safe to retry (use the same Idempotency-Key for POST /activations).
  • 502UPSTREAM_ERROR — the number provider failed. Nothing was charged and it is safe to retry.

Пример запроса

curl -X POST "https://sms-act.net/sms/open-api/v1/activations" \
  -H "X-Access-Key: $SMS_ACT_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"service":"wa","countryId":6}'

Пример ответа

{
  "data": {
    "id": "2348810953",
    "status": "waiting",
    "service": "wa",
    "serviceName": "Whatsapp",
    "countryId": 6,
    "countryName": "Indonesia",
    "phoneNumber": "+6281234567890",
    "code": null,
    "price": {
      "amount": 8,
      "currency": "credits"
    },
    "createdAt": "2026-10-08T09:30:00Z",
    "expiresAt": "2026-10-08T09:50:00Z",
    "completedAt": null,
    "cancelledAt": null
  }
}

Get an activation (poll this for the code)

GET/activations/{id}

Параметры

  • idstringОбязательныйpath
ИмяГдеТипОбязательныйОписание
idpathstringДа

Ответы

data: Activation

  • 200The activation. code is set once status is completed.
  • 401UNAUTHORIZED — missing, invalid or revoked Access Key.
  • 403ACCOUNT_SUSPENDED. POST /activations may also return DAILY_LIMIT_REACHED (details.failedToday, details.blockThreshold) or ACTIVATIONS_RESTRICTED.
  • 404ACTIVATION_NOT_FOUND or NOT_FOUND.
  • 429RATE_LIMITED — wait Retry-After seconds.
  • 500INTERNAL_ERROR — unexpected server error. Nothing was charged and it is safe to retry (use the same Idempotency-Key for POST /activations).

Пример запроса

curl -X GET "https://sms-act.net/sms/open-api/v1/activations/2348810953" \
  -H "X-Access-Key: $SMS_ACT_KEY"

Пример ответа

{
  "data": {
    "id": "2348810953",
    "status": "completed",
    "service": "wa",
    "serviceName": "Whatsapp",
    "countryId": 6,
    "countryName": "Indonesia",
    "phoneNumber": "+6281234567890",
    "code": "482915",
    "price": {
      "amount": 8,
      "currency": "credits"
    },
    "createdAt": "2026-10-08T09:30:00Z",
    "expiresAt": "2026-10-08T09:50:00Z",
    "completedAt": "2026-10-08T09:31:12Z",
    "cancelledAt": null
  }
}

Cancel an activation and get a full refund

POST/activations/{id}/cancel

Allowed only while waiting. Cancelling an already cancelled activation succeeds.

Параметры

  • idstringОбязательныйpath
ИмяГдеТипОбязательныйОписание
idpathstringДа

Ответы

data: Activation

  • 200The cancelled activation.
  • 401UNAUTHORIZED — missing, invalid or revoked Access Key.
  • 403ACCOUNT_SUSPENDED. POST /activations may also return DAILY_LIMIT_REACHED (details.failedToday, details.blockThreshold) or ACTIVATIONS_RESTRICTED.
  • 404ACTIVATION_NOT_FOUND or NOT_FOUND.
  • 409NO_NUMBERS_AVAILABLE, PENDING_LIMIT_REACHED (details.pending, details.limit), ACTIVATION_NOT_CANCELLABLE or IDEMPOTENCY_IN_PROGRESS.
  • 429RATE_LIMITED — wait Retry-After seconds.
  • 500INTERNAL_ERROR — unexpected server error. Nothing was charged and it is safe to retry (use the same Idempotency-Key for POST /activations).
  • 502UPSTREAM_ERROR — the number provider failed. Nothing was charged and it is safe to retry.

Пример запроса

curl -X POST "https://sms-act.net/sms/open-api/v1/activations/2348810953/cancel" \
  -H "X-Access-Key: $SMS_ACT_KEY"

Пример ответа

{
  "data": {
    "id": "2348810953",
    "status": "cancelled",
    "service": "wa",
    "serviceName": "Whatsapp",
    "countryId": 6,
    "countryName": "Indonesia",
    "phoneNumber": "+6281234567890",
    "code": null,
    "price": {
      "amount": 8,
      "currency": "credits"
    },
    "createdAt": "2026-10-08T09:30:00Z",
    "expiresAt": "2026-10-08T09:50:00Z",
    "completedAt": null,
    "cancelledAt": "2026-10-08T09:35:00Z"
  }
}

Health check

GET/healthБез аутентификации

Ответы

  • 200Service is up.

Пример запроса

curl -X GET "https://sms-act.net/sms/open-api/v1/health"

Пример ответа

{
  "status": "ok",
  "version": "1.5.0"
}

Объекты

Activation

  • idstringОбязательный
  • status"waiting" | "completed" | "cancelled"Обязательный
  • servicestringОбязательный
  • serviceNamestringОбязательный
  • countryIdinteger | nullОбязательный

    Null only for a few legacy activations created before the country was recorded.

  • countryNamestring | nullОбязательный

    English name. Null in the same cases as countryId.

  • phoneNumberstringОбязательный

    E.164 format.

  • codestring | nullОбязательный

    The verification code, set when status is completed.

  • priceMoneyОбязательный
  • createdAtstringОбязательный
  • expiresAtstringОбязательный

    Upper bound: if no code arrives, the activation is cancelled and refunded automatically, usually after about 15 minutes and at the latest by this time.

  • completedAtstring | nullОбязательный
  • cancelledAtstring | nullОбязательный
ИмяТипОбязательныйОписание
idstringДа
status"waiting" | "completed" | "cancelled"Да
servicestringДа
serviceNamestringДа
countryIdinteger | nullДаNull only for a few legacy activations created before the country was recorded.
countryNamestring | nullДаEnglish name. Null in the same cases as countryId.
phoneNumberstringДаE.164 format.
codestring | nullДаThe verification code, set when status is completed.
priceMoneyДа
createdAtstringДа
expiresAtstringДаUpper bound: if no code arrives, the activation is cancelled and refunded automatically, usually after about 15 minutes and at the latest by this time.
completedAtstring | nullДа
cancelledAtstring | nullДа

ActivationCreated

Returned by POST /activations. Same as Activation, optionally with a warning.

  • idstringОбязательный
  • status"waiting" | "completed" | "cancelled"Обязательный
  • servicestringОбязательный
  • serviceNamestringОбязательный
  • countryIdinteger | nullОбязательный

    Null only for a few legacy activations created before the country was recorded.

  • countryNamestring | nullОбязательный

    English name. Null in the same cases as countryId.

  • phoneNumberstringОбязательный

    E.164 format.

  • codestring | nullОбязательный

    The verification code, set when status is completed.

  • priceMoneyОбязательный
  • createdAtstringОбязательный
  • expiresAtstringОбязательный

    Upper bound: if no code arrives, the activation is cancelled and refunded automatically, usually after about 15 minutes and at the latest by this time.

  • completedAtstring | nullОбязательный
  • cancelledAtstring | nullОбязательный
  • warningActivationWarning

    The activation was created and charged; this is only a heads-up. Do not retry because of it.

ИмяТипОбязательныйОписание
idstringДа
status"waiting" | "completed" | "cancelled"Да
servicestringДа
serviceNamestringДа
countryIdinteger | nullДаNull only for a few legacy activations created before the country was recorded.
countryNamestring | nullДаEnglish name. Null in the same cases as countryId.
phoneNumberstringДаE.164 format.
codestring | nullДаThe verification code, set when status is completed.
priceMoneyДа
createdAtstringДа
expiresAtstringДаUpper bound: if no code arrives, the activation is cancelled and refunded automatically, usually after about 15 minutes and at the latest by this time.
completedAtstring | nullДа
cancelledAtstring | nullДа
warningActivationWarningНетThe activation was created and charged; this is only a heads-up. Do not retry because of it.

ActivationWarning

The activation was created and charged; this is only a heads-up. Do not retry because of it.

  • code"DAILY_FAILURE_WARNING"Обязательный
  • failedTodayintegerОбязательный
  • blockThresholdintegerОбязательный

    Ordering is blocked for the rest of the day once this many activations have failed.

  • messagestringОбязательный
ИмяТипОбязательныйОписание
code"DAILY_FAILURE_WARNING"Да
failedTodayintegerДа
blockThresholdintegerДаOrdering is blocked for the rest of the day once this many activations have failed.
messagestringДа

Service

  • codestringОбязательный
  • namestringОбязательный
ИмяТипОбязательныйОписание
codestringДа
namestringДа

Country

  • idintegerОбязательный
  • iso2string | nullОбязательный

    ISO 3166-1 alpha-2. Several countries may share a code (e.g. virtual and physical US numbers) — always order by id.

  • namestringОбязательный
ИмяТипОбязательныйОписание
idintegerДа
iso2string | nullДаISO 3166-1 alpha-2. Several countries may share a code (e.g. virtual and physical US numbers) — always order by id.
namestringДа

ServiceCountry

  • countryIdintegerОбязательный
  • iso2string | nullОбязательный
  • countryNamestringОбязательный
  • priceMoneyОбязательный
  • availablebooleanОбязательный

    Best-effort stock hint. true does not guarantee a number; false means ordering will most likely fail with NO_NUMBERS_AVAILABLE.

ИмяТипОбязательныйОписание
countryIdintegerДа
iso2string | nullДа
countryNamestringДа
priceMoneyДа
availablebooleanДаBest-effort stock hint. true does not guarantee a number; false means ordering will most likely fail with NO_NUMBERS_AVAILABLE.

Balance

  • balancenumberОбязательный

    May contain decimals.

  • currency"credits"Обязательный
  • minBalanceToOrdernumberОбязательный

    Minimum balance required to create an activation.

ИмяТипОбязательныйОписание
balancenumberДаMay contain decimals.
currency"credits"Да
minBalanceToOrdernumberДаMinimum balance required to create an activation.

Money

  • amountnumberОбязательный
  • currency"credits"Обязательный
ИмяТипОбязательныйОписание
amountnumberДа
currency"credits"Да

Pagination

  • pageintegerОбязательный

    (≥ 1)

  • pageSizeintegerОбязательный

    (1–100)

  • totalintegerОбязательный

    (≥ 0)

ИмяТипОбязательныйОписание
pageintegerДа(≥ 1)
pageSizeintegerДа(1–100)
totalintegerДа(≥ 0)

Коды ошибок

Повторяемые ошибки могут исчезнуть, если отправить тот же запрос позже. При повторе POST /activations используйте тот же Idempotency-Key.

  • INVALID_REQUESTHTTP 400Можно повторить: НетA parameter is missing or malformed. details.field names it.
  • UNAUTHORIZEDHTTP 401Можно повторить: НетThe X-Access-Key header is missing, invalid or the key was revoked.
  • INSUFFICIENT_BALANCEHTTP 402Можно повторить: НетBalance is below the minimum required to create activations. Top up and retry.
  • ACCOUNT_SUSPENDEDHTTP 403Можно повторить: НетThe account that owns the key has been suspended.
  • DAILY_LIMIT_REACHEDHTTP 403Можно повторить: НетToo many activations failed today (cancelled orders count as failures). Ordering resumes tomorrow. With the default limits, a new account that has never received a code can fail up to 14 times a day; see ACTIVATIONS_RESTRICTED.
  • ACTIVATIONS_RESTRICTEDHTTP 403Можно повторить: НетOrdering is restricted for today due to an abnormal failure pattern: 15 or more failures with a success rate below 10%, for any account. cancelled orders (manual or automatic timeout) count as failures.
  • ACTIVATION_NOT_FOUNDHTTP 404Можно повторить: НетThe activation does not exist or belongs to another account.
  • NOT_FOUNDHTTP 404Можно повторить: НетThe endpoint or service does not exist.
  • NO_NUMBERS_AVAILABLEHTTP 409Можно повторить: ДаNo numbers right now for this service and country. Retry in a minute or try another country.
  • PENDING_LIMIT_REACHEDHTTP 409Можно повторить: ДаToo many activations are still waiting for a code (at most 3 at a time, counting orders placed on the website too). Wait for one to finish or cancel it.
  • ACTIVATION_NOT_CANCELLABLEHTTP 409Можно повторить: НетThe activation already received a code and cannot be cancelled.
  • IDEMPOTENCY_IN_PROGRESSHTTP 409Можно повторить: ДаA request with the same Idempotency-Key is still being processed.
  • UNSUPPORTED_SERVICE_COUNTRYHTTP 422Можно повторить: НетThis service cannot be ordered in this country. See GET /services/{service}/countries.
  • IDEMPOTENCY_KEY_REUSEDHTTP 422Можно повторить: НетThe Idempotency-Key was already used with a different request body.
  • RATE_LIMITEDHTTP 429Можно повторить: ДаToo many requests: more than 60 per 10 seconds on one key, too many failed authentication attempts from one IP, or another order from the same account is still being created. Wait for the number of seconds in Retry-After.
  • UPSTREAM_ERRORHTTP 502Можно повторить: ДаThe number provider failed. Nothing was charged.
  • INTERNAL_ERRORHTTP 500Можно повторить: ДаUnexpected server error. Nothing was charged. Retry with the same Idempotency-Key.