HTTP/HTTPS API

Connect numbers, send and receive SMS from your app. Bearer token auth, JSON responses, public endpoints without a key.

API

Quick start

1
Create an account or log in to your dashboard.
2
Enable the API in settings and copy your token.
3
Authorization
Send the token in the Authorization header.
4
Methods
Use the endpoints below for numbers and SMS.
5
Balance
Top up your balance to buy a number or send SMS.

Authentication

All requests except /api/login, /api/register, /api/restore_password and /api/public/* require a Bearer token. The same methods are also available under /api/v1/....

Authorization: Bearer <api_token>

Base URL: https://sms-numbers.co/api

For POST with a body send Content-Type: application/json. Responses return Content-Type: application/json; charset=UTF-8.

Numbers API

GET

List numbers

Returns numbers on your account (with country and status). Disposable numbers are hidden by default.

GET https://sms-numbers.co/api/numbers

Header: Authorization: Bearer <api_token>

  • filter (string) — optional status filter by filter_slug, e.g. active.
  • include_disposable (boolean) — include temporary/OTP numbers.
GET

Number details

Returns details for a specific number that belongs to you.

GET https://sms-numbers.co/api/number/{id}

Path: id (integer) — number ID from the list. 404 if missing.

GET

Search (legacy)

Kept for compatibility. Prefer public price endpoints to get tariffs, then buy with POST /api/number/buy.

GET https://sms-numbers.co/api/numbers/search/{iso}

Path: iso — country ISO code, e.g. ru, us.

Tariffs: GET https://sms-numbers.co/api/public/countries and GET https://sms-numbers.co/api/public/prices/{country_id}.

POST

Connect a number

Places an order for a long-term number. Charges the balance; if funds are insufficient returns 402 with payment links. Profile email must be valid (used for SMS forwarding).

POST https://sms-numbers.co/api/number/buy

JSON body:

  • agree_terms (required) — must be accepted (true / 1).
  • number_price_id (integer) — tariff ID from /api/public/prices/{id} (required unless country is set).
  • country (integer) — same as tariff ID (alias of number_price_id).
  • period (integer, 1–36, default 1) — months of subscription.
  • payment_method (optional, default balance) — use balance; other values create a pending payment.

Example body:

{"agree_terms":true,"number_price_id":123,"period":1}
POST

Disconnect a number

Cancels an unconnected order (with refund if paid from balance) or schedules disconnection of an active number.

POST https://sms-numbers.co/api/number/cancel
  • id (required, integer) — number ID.
  • asap (boolean, optional) — disconnect immediately; otherwise scheduled until valid_till.
POST

Update number settings

Incoming SMS forwarding and a custom tag.

POST https://sms-numbers.co/api/number/update
  • id (required).
  • email — forward incoming SMS to email (dest_email).
  • number — forward to another phone (dest_number).
  • user_tag — custom label.

Services API (temporary / OTP)

POST

Buy a temporary number

Orders a disposable number for a service (≈15 minutes). Same balance / payment-link behaviour as long-term buy.

POST https://sms-numbers.co/api/service/buy
  • service_id (required) — service ID from /api/public/services.
  • country_id (required) — country ID from /api/public/services/{id}/countries.
  • agree_terms (required) — must be accepted.
  • payment_method (optional, default balance).

Flow: GET /api/public/services → GET /api/public/services/{id}/countries → POST /api/service/buy.

{"service_id":10,"country_id":226,"agree_terms":true}

Travel eSIM

Catalog, purchase and installation data for the mobile app. The same paths exist under /api/v1. A Bearer token is required. Prices are the sell price in EUR; wholesale prices are not returned.

GET

Countries

Countries that currently have eSIM packages. Optional query q filters by name or ISO code.

GET https://sms-numbers.co/api/esim/countries
GET

Packages

Data plans for a country. iso is a two-letter code, for example de. Each package includes package_id, data volume, validity_days and price_eur.

GET https://sms-numbers.co/api/esim/packages/{iso}
POST

Buy an eSIM

Charges the account balance and returns the order with QR and installation fields. If the balance is too low, the response is 402 with payment links.

POST https://sms-numbers.co/api/esim/purchase

package_id (required) — package id from the packages list.

{"package_id":"change-7days-1gb"}
GET

My orders

Completed eSIM orders, newest first. Query page for the next page (20 per page).

GET https://sms-numbers.co/api/esim/orders
GET

Order details

One order: sims with qrcode, qrcode_url, iccid and direct_apple_installation_url when Airalo provides them, plus installation HTML.

GET https://sms-numbers.co/api/esim/orders/{id}

Messages API

GET

List messages

All SMS for the account.

GET https://sms-numbers.co/api/messages
GET

Conversations

Latest message per conversation partner (chat list).

GET https://sms-numbers.co/api/app/messages
GET

Messages by number

Full history with {number}. Marks those messages as viewed.

GET https://sms-numbers.co/api/app/messages/{number}
POST

Send SMS

Sends one or more outbound SMS. Requires positive balance.

POST https://sms-numbers.co/api/message/send
  • from (string) — your virtual number; if omitted/unknown, the system sender is used.
  • to (required) — destination; digits and + ( ) -; several numbers separated by commas.
  • body (required) — message text.

Account and payments

GET

Profile

Current user object.

GET https://sms-numbers.co/api/account/profile
POST

Update profile

Optional fields: firstname, lastname, phone, country, city, address, zip, company, telegram_id.

POST https://sms-numbers.co/api/account/update
GET

Balance

Returns credit and currency code.

GET https://sms-numbers.co/api/account/balance
GET

Payment history

Payments for the account, newest first.

GET https://sms-numbers.co/api/payments
POST

Create a payment

Creates a pending top-up and returns a payment link.

POST https://sms-numbers.co/api/payment/create
  • amount (required, > 0) — amount in EUR.
  • method (required) — card or crypto.
  • number_price_id (optional) — attach a number tariff description.

Response includes payment_link → /api/payment/{id}/{method}/pay.

Public endpoints

No authentication required (except where noted for login/register).

GET

List countries

All countries in the catalog.

GET https://sms-numbers.co/api/public/countries
GET

Countries with numbers

Countries that have long-term number tariffs.

GET https://sms-numbers.co/api/public/countries/numbers
GET

Country details

Country info, operators (MCC/MNC) and available product types.

GET https://sms-numbers.co/api/public/country/{id}
GET

Prices by country

Long-term tariffs (numbers_prices), disposable (numbers_disposable_prices), outbound SMS rates (messages_outgoing_prices), and country meta.

GET https://sms-numbers.co/api/public/prices/{country_id}
GET

List services

OTP / registration services available via API.

GET https://sms-numbers.co/api/public/services
GET

Service countries

Countries and setup prices for a service (id from the services list).

GET https://sms-numbers.co/api/public/services/{id}/countries
POST

Login

Body: email, password. Returns data.token.

POST https://sms-numbers.co/api/login
POST

Sign up

Body: email, password (min 6); optional firstname, lastname. Returns user with API token.

POST https://sms-numbers.co/api/register
POST

Password reset

Body: email — sends a reset link.

POST https://sms-numbers.co/api/restore_password

Server responses

200 OKSuccess
400 Bad RequestInvalid request parameters
401 UnauthorizedMissing or invalid token
402 Payment RequiredValid parameters, but the request failed (e.g. insufficient balance)
403 ForbiddenForbidden / validation failed
404 Not FoundResource not found
422 UnprocessableUnprocessable entity (e.g. missing profile email)
429 Too Many RequestsRate limit exceeded
500 / 502 / 503 / 504Server-side error

Success: {"success": true, "data": {...}, "message": "..."}

Error: {"success": false, "message": "...", "data": {...}}

Sign up icon

Sign Up

Register now, verify your email, and get test funds to try out phone numbers