SMSREC
登录充值余额
REST API v1

Automate SMS activations

Use one API for balance, live prices, virtual number purchases and verification codes. The same balance and automatic refund rules apply to the dashboard and API.

Get an API keyhttps://smsrec.com/api/v1

Authentication

Create or rotate your key in Account Settings. Send it in the Authorization header. The full key is displayed only once; SMSREC stores only its cryptographic hash.

Authorization: Bearer smsrec_live_YOUR_API_KEY
Keep the key on your server. Never embed it in browser or mobile application code.

Errors, limits and idempotency

Responses are JSON and include an ok boolean. The current limit is 60 requests per minute per API key. Purchase requests require a unique Idempotency-Key so a network retry cannot buy the same number twice.

{ "ok": false, "error": {"code": "insufficient_balance", "message": "Not enough balance."} }

GET/api/v1/balance

Returns the current account balance.

curl https://smsrec.com/api/v1/balance \ -H "Authorization: Bearer $SMSREC_API_KEY"

GET/api/v1/services

Returns all services with live stock and their lowest current price.

GET/api/v1/prices?service=telegram

Returns up to 500 current service-country offers. Provide service, country, or both.

POST/api/v1/activations

service required — service code from the services endpoint
country required — country code from the prices endpoint
Idempotency-Key required header — a unique value for this purchase attempt
curl -X POST https://smsrec.com/api/v1/activations \ -H "Authorization: Bearer $SMSREC_API_KEY" \ -H "Idempotency-Key: order-2026-0001" \ -H "Content-Type: application/json" \ -d '{"service":"telegram","country":"indonesia"}'

GET/api/v1/activations/{id}

Poll every 3–5 seconds. When the SMS arrives, status becomes received and code contains the verification code.

{ "ok": true, "activation": { "id": 42, "phone": "+628123456789", "status": "received", "code": "482913", "price_usd": "0.68" } }

POST/api/v1/activations/{id}/cancel

Cancels a waiting activation and returns its price to your SMSREC balance. A received activation is completed without a refund.

curl -X POST https://smsrec.com/api/v1/activations/42/cancel \ -H "Authorization: Bearer $SMSREC_API_KEY"