MarioSMS

Developers Receive SMS codes
from code.

A small REST API: rent a number, poll for the code, done. You pay only when a code arrives; timed-out activations refund automatically, so failed routes cost your scripts nothing.

Base URL and authentication

https://app.mariosms.com/api/v1

Pass your API key (from your profile in the app) in the X-API-Key header, or as an api_key query parameter. All responses are JSON.

curl -H "X-API-Key: YOUR_KEY" https://app.mariosms.com/api/v1/balance
{ "balance": 100.00 }

Endpoints

MethodEndpointDescription
GET /balance Get current account balance
GET /countries List available countries
GET /services List available services
GET /prices Get prices for country/service combinations
POST /activation Create an activation (rent a number). activationType: SMS (default), CALL_VOICE, CALL_FLASH
GET /activation/:id Get activation details and the SMS code
GET /activations List all activations (paginated)
GET /activations/active List active activations
POST /activation/:id/cancel Cancel an activation and get a refund
POST /activation/:id/complete Mark an activation as completed
GET /transactions List transaction history (paginated)

The core loop

Rent a number for one verification, then poll until the code arrives:

# 1. Rent a US number for a Telegram verification
curl -X POST -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"country": "us", "service": "tg"}' \
  https://app.mariosms.com/api/v1/activation

{
  "id": "507f1f77bcf86cd799439011",
  "phone": "12025551234",
  "service": "tg",
  "country": "us",
  "price": 1.32,
  "status": "pending",
  "activationType": "SMS",
  "expiresAt": "2026-08-22T10:55:00Z"
}

# 2. Poll until status is "received"
curl -H "X-API-Key: YOUR_KEY" https://app.mariosms.com/api/v1/activation/507f1f77bcf86cd799439011

{
  "status": "received",
  "smsCode": "123456",
  "smsText": "Your Telegram code is 123456"
}

# 3. Or cancel before an SMS arrives for a full refund
curl -X POST -H "X-API-Key: YOUR_KEY" \
  https://app.mariosms.com/api/v1/activation/507f1f77bcf86cd799439011/cancel

{ "message": "activation cancelled", "refund": 1.32 }

activationType accepts SMS (default), CALL_VOICE, and CALL_FLASH; an optional operator field pins a specific carrier.

Client libraries and tutorials

Compatibility API (handler_api protocol)

For scripts and tools written against the classic protocol used across the industry, MarioSMS exposes a compatibility endpoint. Most legacy integrations migrate with a base-URL change: same actions, same response formats.

https://app.mariosms.com/stubs/handler_api.php

Authentication is the api_key query parameter. Actions:

ActionPurposeResponse format
getBalance Account balance ACCESS_BALANCE:44.60
getCountries List countries with numeric IDs JSON object keyed by country ID
getNumbersStatus Available numbers per service in a country {"telegram_0": 76, ...}
getPrices Prices for all services across countries JSON: country → service → {count, price}
getNumber Rent a number (deducts the price) ACCESS_NUMBER:activationId:phone
getStatus Poll an activation for the code STATUS_OK:CODE / STATUS_WAIT_CODE / …
getFullSms Full SMS text, not just the code FULL_SMS:[vk] 877613
setStatus Finish (status=6) or cancel (status=8) ACCESS_ACTIVATION / ACCESS_CANCEL

Renting and polling, classic style

# Balance
curl "https://app.mariosms.com/stubs/handler_api.php?api_key=KEY&action=getBalance"
ACCESS_BALANCE:44.60

# Rent a Telegram number (country accepts a numeric ID or ISO code)
curl "https://app.mariosms.com/stubs/handler_api.php?api_key=KEY&action=getNumber&country=48&service=tg"
ACCESS_NUMBER:8601705018416664:33774545375

# Voice call instead of SMS: add &activationType=2 (1 = flash call, 0 = SMS default)

# Poll for the code
curl "https://app.mariosms.com/stubs/handler_api.php?api_key=KEY&action=getStatus&id=8601705018416664"
STATUS_OK:877613

# Full SMS text
curl "https://app.mariosms.com/stubs/handler_api.php?api_key=KEY&action=getFullSms&id=8601705018416664"
FULL_SMS:[vk] 877613

# Finish (6) or cancel for refund (8)
curl "https://app.mariosms.com/stubs/handler_api.php?api_key=KEY&action=setStatus&id=8601705018416664&status=8"
ACCESS_CANCEL

getStatus responses

ResponseMeaning
STATUS_OK:CODESMS received; CODE is the verification code
STATUS_WAIT_CODEWaiting for the SMS
STATUS_WAIT_RETRY:LASTCODEWaiting for the next SMS; LASTCODE is the previous code
STATUS_CANCELActivation was cancelled

Error codes

ErrorMeaning
BAD_ACTIONInvalid or missing action parameter
BAD_KEYInvalid API key
NO_BALANCEInsufficient balance to purchase a number
NO_NUMBERSNo numbers available for this country/service
NO_ACTIVATIONActivation not found or not owned by you
TOO_MANY_ACTIVE_RENTALSRate limit for active activations exceeded

Service codes

Both APIs identify services by short codes. The most-used ones:

CodeServiceCodeService
tg Telegram wa WhatsApp
go Google fb Facebook
ig Instagram tw X (Twitter)
lf TikTok ds Discord
am Amazon mm Microsoft
mb Yahoo oi Tinder
ub Uber fu Snapchat
bw Signal ts PayPal
vi Viber dh eBay
vk VK tx Bolt
wb WeChat ab Alibaba
hx AliExpress tn LinkedIn
nf Netflix mt Steam
ya Yandex dr OpenAI
hb Twitch kt KakaoTalk
kc Vinted ot Other

The full live catalog (hundreds of services) with current codes comes from GET /api/v1/services, and per-country availability from action=getPrices. Country IDs come from action=getCountries; the REST API uses ISO codes (us, de, gb) directly.

HTTP status codes

StatusMeaning
200Success
400Bad request: invalid parameters
401Unauthorized: invalid or missing API key
402Payment required: insufficient balance
404Not found
429Too many requests: rate limit exceeded
503Service unavailable: no numbers available

Automation is welcome for QA, testing, and accounts you're entitled to create; bulk abuse is not. See the acceptable use policy.