beast-sms.com API
Use the beast-sms.com API to automate number purchases and SMS retrieval. All requests go to api.beast-sms.com over HTTPS and are authenticated with an api_key.
Base URL: https://api.beast-sms.com. Machine-readable: OpenAPI 3.1, Postman collection.
Authentication and transport
Every request carries api_key=<your key>. Keys are generated in your beast-sms.com account, work only on api.beast-sms.com and can be limited to a list of IP addresses.
Access to the API
A new beast-sms.com account has no API access yet: calls are answered with BAD_KEY until the first top-up is credited. After that the key starts working at once, and refunds do not switch it off. Support can open access earlier on request.
Only https is served. A request made over plain http is blocked instead of redirected, because the api_key in it has already travelled in the clear. If your client silently follows http, it will fail: fix the base URL.
Methods marked text answer with a single line such as ACCESS_NUMBER:id:phone or a status word. Methods marked JSON answer with application/json. Pass format=json to get JSON errors from a text method.
Purchase restrictions and activation statuses
BANNED means the account may not buy numbers until a given time. The time is UTC, in quotes after the colon in text replies and in info.until, as ISO 8601, in JSON replies with HTTP 403. You can still read statuses, cancel and check the balance meanwhile.
A running activation reads STATUS_WAIT_CODE or STATUS_WAIT_RETRY, a successful one STATUS_OK:<code>, and a cancelled or refunded one STATUS_CANCEL. Stop polling after STATUS_OK or STATUS_CANCEL.
Rate limits
Requests are limited per key and per second by method class. Above the limit you get TOO_MANY_REQUESTS; wait and retry with a pause.
| Method class | Requests per second per key |
|---|---|
buy | 100 |
write | 300 |
status | 700 |
price | 50 |
rest | 300 |
Activations
getNumbertext, purchase key
Buys a number for a service and a country. The reply is a single line with the activation id and the phone number.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=...&country=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getNumber |
service | yes | Service code, lowercase latin letters, for example tg. |
country | yes | Numeric country code. |
multiple | no | Ask for a number that can receive several SMS: 1, 0, true or false. |
maxPrice | no | Highest price you accept, in USD with up to four decimals. |
providerIds | no | Comma-separated provider ids to buy from, up to 50. |
exceptProviderIds | no | Comma-separated provider ids to avoid, up to 50. |
activationType | no | Activation type, 0 for SMS. |
fixedPrice | no | Set to 1 to buy only at exactly maxPrice. |
ref | no | Free text label of your own that is stored with the purchase. |
Example reply:
ACCESS_NUMBER:1767935837:75555061241
getNumberV2JSON, purchase key
Orders a number and answers with JSON: activation id, phone number, price, timers and country.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumberV2&service=...&country=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getNumberV2 |
service | yes | Service code, lowercase latin letters, for example tg. |
country | yes | Numeric country code. |
multiple | no | Ask for a number that can receive several SMS: 1, 0, true or false. |
maxPrice | no | Highest price you accept, in USD with up to four decimals. |
providerIds | no | Comma-separated provider ids to buy from, up to 50. |
exceptProviderIds | no | Comma-separated provider ids to avoid, up to 50. |
activationType | no | Activation type, 0 for SMS. |
fixedPrice | no | Set to 1 to buy only at exactly maxPrice. |
ref | no | Free text label of your own that is stored with the purchase. |
requestId | no | Idempotency key, 8-64 characters. A repeat with the same value returns the same activation. |
getStatustext, read key
Reads the state of an activation by id. A cancelled or refunded activation answers STATUS_CANCEL. Safe to call repeatedly within your rate limit.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getStatus&id=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getStatus |
id | yes | Activation id returned by the purchase call. |
full_text | no | Set to 1 to receive the whole SMS text instead of the code. |
Example reply:
STATUS_OK:843494
getStatusV2JSON, read key
Returns the state of an activation as JSON, including the SMS code and the full SMS text when available.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getStatusV2&id=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getStatusV2 |
id | yes | Activation id returned by the purchase call. |
getFullSmstext, read key
Gives the complete message text for an activation as plain text, or STATUS_WAIT_CODE and STATUS_CANCEL when there is no text.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getFullSms&id=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getFullSms |
id | yes | Activation id returned by the purchase call. |
setStatustext, purchase key
Sends a command for an activation. Cancelling before the cancellation window opens is refused.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=setStatus&id=...&status=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | setStatus |
id | yes | Activation id returned by the purchase call. |
status | yes | Command: 1 number is ready, 3 request another SMS, 6 finish, 8 cancel. |
Example reply:
ACCESS_CANCEL
setStatusV2JSON, purchase key
JSON variant of setStatus: ready, another SMS, finish or cancel.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=setStatusV2&id=...&status=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | setStatusV2 |
id | yes | Activation id returned by the purchase call. |
status | yes | Command: 1 number is ready, 3 request another SMS, 6 finish, 8 cancel. |
getActiveActivationsJSON, read key
Returns your activations that are still running, newest first.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getActiveActivations
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getActiveActivations |
start | no | Number of rows to skip. |
limit | no | Page size, 1-100. |
getHistoryJSON, read key
Activation history in JSON for up to 31 days, filtered by status if you need it.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getHistory
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getHistory |
from | no | Start of the window: unix seconds or ISO 8601. Default is 24 hours before to. |
to | no | End of the window: unix seconds or ISO 8601. Default is now. The window is at most 31 days. |
status | no | Comma-separated activation statuses to keep: 1 waiting, 2 code received, 3 waiting next SMS, 6 completed, 7 refunded, 8 cancelled. |
limit | no | Page size, 1-100. |
cursor | no | The nextCursor value of the previous page. |
Example reply:
{"status":"success","data":[{"activationId":"1767935837","serviceCode":"tg","phoneNumber":"75555061241","activationCost":0.16,"activationStatus":"6","smsCode":"843494","countryCode":6,"currency":840}],"nextCursor":null}
Prices and stock
getPricestext, read key
Lists the current price and the number of available numbers for each country and service pair.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getPrices
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getPrices |
service | no | Service code, lowercase latin letters, for example tg. |
country | no | Numeric country code. |
Example reply:
{"6":{"tg":{"cost":"0.1600","count":120}}}getFreePricestext, read key
Returns price tiers with cumulative stock for each country and service pair.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getFreePrices
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getFreePrices |
service | no | Service code, lowercase latin letters, for example tg. |
country | no | Numeric country code. |
getPricesV3JSON, read key
Returns prices with the providers that sell each pair, so you can pin or exclude providers.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getPricesV3&service=...&country=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getPricesV3 |
service | yes | Service code, lowercase latin letters, for example tg. |
country | yes | Numeric country code. |
getOffersJSON, read key
A compact offers table for the requested services and countries, in JSON.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getOffers
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getOffers |
services | no | Comma-separated service codes. |
countries | no | Comma-separated numeric country codes. |
getTopCountriesByServicetext, read key
Shows where a service has the best stock and what it costs there.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getTopCountriesByService&service=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getTopCountriesByService |
service | yes | Service code, lowercase latin letters, for example tg. |
freePrice | no | Set to true to include price tiers in every row. |
getNumbersStatustext, read key
A flat map of service codes to available quantities for a country.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumbersStatus&country=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getNumbersStatus |
country | yes | Numeric country code. |
getServiceNumbersCounttext, read key
Returns, for one service, the quantity of numbers available in each country.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getServiceNumbersCount&service=...
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getServiceNumbersCount |
service | yes | Service code, lowercase latin letters, for example tg. |
Reference and account
getBalancetext, read key
Returns the account balance in USD with four decimal places.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getBalance
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getBalance |
format | no | Set to json to receive a JSON reply where the method supports it. |
Example reply:
ACCESS_BALANCE:12.3400
getServicesListJSON, read key
Service catalogue in JSON: codes to use in purchase calls and display names.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getServicesList
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getServicesList |
country | no | Numeric country code. |
lang | no | Language of names: en or ru. |
getCountriesJSON, read key
Country catalogue in JSON: numeric codes to use in purchase calls and display names.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getCountries
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getCountries |
getProviderstext, read key
Lists provider ids you can pin or exclude when buying, with simple quality indicators.
GET https://api.beast-sms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getProviders
| Parameter | Required | Description |
|---|---|---|
api_key | yes | Your API key. |
action | yes | getProviders |
service | no | Service code, lowercase latin letters, for example tg. |
country | no | Numeric country code. |
Errors
Text methods answer with an error token. JSON methods answer with title, details and, for field errors, info.field. Match on the token or title, never on details.
| Text token | HTTP, text | JSON title | HTTP, JSON | Details example |
|---|---|---|---|---|
BAD_ACTION | 200 | BAD_ACTION | 200 | The method is not supported |
BAD_COUNTRY | 200 | BAD_COUNTRY | 200 | This country cannot be ordered |
BAD_KEY | 401 | BAD_KEY | 401 | The supplied api_key was not accepted |
BAD_SERVICE | 200 | BAD_SERVICE | 200 | This service cannot be ordered |
BAD_STATUS | 200 | BAD_STATUS | 200 | Status change is not applicable |
BANNED:'<until, UTC>' | 200 | BANNED | 403 | The account is temporarily limited from buying numbers |
EARLY_CANCEL_DENIED | 200 | EARLY_CANCEL_DENIED | 409 | Cancellation is not allowed yet |
ERROR_SQL | 503 | INTERNAL_ERROR | 503 | Internal problem, repeat the request later |
ERROR_SQL | 200 | INTERNAL_ERROR, TRY_LATER | 503 | Internal problem, repeat the request later / The result is not confirmed yet, please try again |
NO_BALANCE | 200 | NO_BALANCE | 402 | Top up the balance to place this order |
NO_NUMBERS | 200 | NO_NUMBERS | 200 | No numbers are available right now |
NO_PROVIDERS | 200 | NO_PROVIDERS | 200 | None of the chosen providers can serve the request |
NO_ACTIVATION | 200 | NOT_FOUND | 404 | Activation was not found for this account |
| - | - | PURCHASE_IN_PROGRESS | 409 | A purchase with this requestId is still being processed |
STATUS_OK:<code> | 200 | SMS_RECEIVED | 409 | Code received, cancelling is no longer possible |
TOO_MANY_REQUESTS | 429 | TOO_MANY_REQUESTS | 429 | Request rate limit exceeded, slow down |
BAD_<FIELD> | 200 | UNPROCESSABLE_ENTITY | 422 | |
WRONG_MAX_PRICE:<min> | 200 | WRONG_MAX_PRICE | 400 | maxPrice is lower than the minimum sale price |
Webhook for incoming SMS
Webhooks deliver incoming SMS to your server as they arrive. Configure the address and the secret in your beast-sms.com account.
Each delivery is a POST with Content-Type: application/json, the header User-Agent: beast-sms.com/3.0 (webhook) and the signature headers described below. The body:
{"activationId":"1767935837","service":"tg","text":"Your code is 843494","code":"843494","country":6,"receivedAt":"2026-10-08T12:03:11+00:00","smsId":"1767935837-1","deliveryId":"deliv-0001","sentAt":"2026-10-08T12:03:12+00:00"}
| Field | Meaning |
|---|---|
activationId, service, country | Same as in the API. country is the numeric country code. |
code, text | The code and the SMS text. text equals the code when there is no text. |
receivedAt | When the SMS reached us. |
smsId | Stable id of the SMS, the same in every retry. |
deliveryId | Id of the delivery, the same in every attempt. |
sentAt | Time of the current attempt, covered by the signature. |
test | Only in test deliveries sent from your account: true. |
Verify the signature
Sign the raw body bytes with HMAC-SHA256 and your secret and compare the hex digest with X-Signature without short-circuiting. Accept X-Signature-Previous too during the 24 hour rotation window. Drop deliveries whose sentAt is more than 5 minutes old.
const crypto = require("node:crypto");
function valid(rawBody, header, secret) {
const digest = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
const a = Buffer.from(digest);
const b = Buffer.from(String(header));
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
Retries and disabling
Answer with any 2xx status within 5 seconds. Otherwise the delivery is repeated after 5, 30 and 120 seconds, four attempts in total. 5xx, 408, 429, timeouts and network errors are retried, other 3xx and 4xx answers are final and redirects are never followed. Deliveries can arrive out of order and repeat: use smsId to deduplicate and receivedAt to order.
Persistent failure disables the subscription: 20 failures in a row and at least 30 minutes since the first one. You receive an email and can re-enable it later.
Address rules
Accepted: https URLs with a public host name on port 443 or 1024-65535. Refused: IP literals, user:password parts, redirect targets and any host that resolves to a non-public address.
Account sign-in and devices
A new email is activated only after you open the link sent to it. The previous address receives a notice about the change.
The account settings list the devices that are signed in. You can sign out one device or all other devices, and a first sign-in from a new device sends you an email.