Documentação da API
Uma API REST limpa para números, códigos e eSIMs. Autentique, compre, consulte — três chamadas e o código é seu.
Autenticação
Crie uma chave de API no seu painel e envie em toda requisição:
Authorization: Bearer sk_live_your_api_keyRate limit: 60 requisições/minuto por chave (padrão). As respostas incluem headers X-RateLimit-*.
/api/v1/balanceGet balance
Returns your wallet balance in USD.
Requisição
curl https://tempsmsnow.com/api/v1/balance \
-H "Authorization: Bearer sk_live_..."Resposta
{
"balance": 12.50,
"available": 12.10,
"reserved": 0.40,
"currency": "USD"
}/api/v1/sms/pricesList services & prices
Without params, lists all services. With ?service=whatsapp, lists countries with live price and stock.
Requisição
curl "https://tempsmsnow.com/api/v1/sms/prices?service=whatsapp" \
-H "Authorization: Bearer sk_live_..."Resposta
{
"service": "whatsapp",
"countries": [
{ "country": "US", "name": "United States", "price": 0.35, "available": 12043 },
{ "country": "BR", "name": "Brazil", "price": 0.10, "available": 98220 }
]
}/api/v1/sms/routesList servers for a route (price + measured delivery)
Every server that can sell this service in this country, with its own price, stock and the delivery rate WE measured on real orders (not the provider's claim). delivery.level: high ≥ 80%, good ≥ 60%, fair ≥ 30%, low < 30%, unknown = no sample yet; scope "route" = measured on this exact service+country, "server" = borrowed from the server's other routes. Use `server` in the purchase call to buy through a specific one and get predictable pricing.
Requisição
curl "https://tempsmsnow.com/api/v1/sms/routes?service=whatsapp&country=US" \
-H "Authorization: Bearer sk_live_..."Resposta
{
"service": "whatsapp",
"country": "US",
"servers": [
{ "server": 2, "label": "Server 2", "price": 0.35, "available": 12043,
"delivery": { "level": "high", "min_rate": 80, "scope": "route" } },
{ "server": 5, "label": "Server 5", "price": 0.24, "available": 310978,
"delivery": { "level": "unknown", "min_rate": null, "scope": null } }
]
}/api/v1/sms/purchaseBuy a number
Buys a number for the given service and country. Balance is reserved and only charged when the SMS code arrives. Optional `server` (from /sms/routes) buys through that server only — you pay exactly its price and we never deliver through another one; without it, we route automatically with fallback. The response tells you which server was used.
Requisição
curl -X POST https://tempsmsnow.com/api/v1/sms/purchase \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"service": "whatsapp", "country": "US", "server": 2}'Resposta
{
"order": {
"id": "3f7c9e0a-...",
"service": "whatsapp",
"country": "US",
"phone": "+12025550123",
"status": "active",
"price": 0.35,
"server": 2,
"server_label": "Server 2",
"expires_at": "2026-08-10T22:20:00.000Z"
}
}/api/v1/sms/orders/{id}Check order / get code
Poll this endpoint (every 2-5s) until status becomes `completed` — the SMS code will be in `code`.
Requisição
curl https://tempsmsnow.com/api/v1/sms/orders/3f7c9e0a-... \
-H "Authorization: Bearer sk_live_..."Resposta
{
"order": {
"id": "3f7c9e0a-...",
"status": "completed",
"phone": "+12025550123",
"server": 2,
"code": "482913",
"text": "Your WhatsApp code is 482913"
}
}/api/v1/sms/orders/{id}/cancelCancel order
Cancels an active order before the code arrives. The reserved amount is fully released back to your balance.
Requisição
curl -X POST https://tempsmsnow.com/api/v1/sms/orders/3f7c9e0a-.../cancel \
-H "Authorization: Bearer sk_live_..."Resposta
{
"order": { "id": "3f7c9e0a-...", "status": "cancelled", "refunded": true }
}/api/v1/esim/packagesList eSIM packages
Without params, lists destination country codes. With ?destination=US, lists available data packages.
Requisição
curl "https://tempsmsnow.com/api/v1/esim/packages?destination=US" \
-H "Authorization: Bearer sk_live_..."Resposta
{
"packages": [
{
"id": "85d45f33-...",
"name": "USA 5GB · 30 days",
"data_mb": 5120,
"validity_days": 30,
"countries": ["US"],
"price": 13.50
}
]
}/api/v1/esim/purchaseBuy an eSIM
Buys the package and charges your balance. Poll the order for the QR code.
Requisição
curl -X POST https://tempsmsnow.com/api/v1/esim/purchase \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"package_id": "85d45f33-..."}'Resposta
{
"order": { "id": "b8a1c2d3-...", "status": "provisioning", "price": 13.50 }
}/api/v1/esim/orders/{id}Get eSIM / QR code
Poll until status becomes `delivered` — then `qr_code_url` and `activation_code` are available.
Requisição
curl https://tempsmsnow.com/api/v1/esim/orders/b8a1c2d3-... \
-H "Authorization: Bearer sk_live_..."Resposta
{
"order": {
"id": "b8a1c2d3-...",
"status": "delivered",
"iccid": "8910001234567890",
"qr_code_url": "https://...",
"activation_code": "LPA:1$rsp.example.com$ABC-123"
}
}Erros
401 unauthorized— Chave de API ausente ou inválida.402 insufficient_balance— Saldo insuficiente — recarregue sua carteira.404 no_offers / not_found— Sem estoque para essa combinação, ou recurso não encontrado.429 rate_limited— Rate limit excedido — diminua o ritmo.502 purchase_failed— Falha no upstream — você não foi cobrado.