REST · JSON · v1

SMS activation API

Connect your application to LuckyMonkey: find a service, reserve a number and receive its SMS code through a single API.

BASE URLhttps://luckymonkey.cc/api/v1/
AUTHORIZATIONBearer YOUR_API_KEY
HTTPSUSDOpenAPI 3.0

Quick start

  1. 01

    Create an account and top up

    Start from a service page. Your website balance is also your API balance.

  2. 02

    Create an API key

    Give each integration its own key. Choose read-only access or permission to place orders.

  3. 03

    Get a number and wait for SMS

    Fetch a quote, create an order, then check its status every 5 seconds. SMS completion is automatic.

Authentication

Public catalog methods work without a key. Balance, orders and SMS require a Bearer key. Browser login cookies are not accepted by the API.

Authorization: Bearer YOUR_API_KEY

The full key is shown once. Keep it on your server and send it only in the Authorization header over HTTPS. You can revoke it at any time. Changing your password invalidates your keys.

Endpoints

MethodURLAccess
GET/balance

Available and reserved balance

Read
GET/countries

Available countries and ISO codes

Public
GET/services?q=telegram

Services; optional q search

Public
GET/prices?service=telegram&country=US

Current quotes; service is required, country is optional

Public
GET/orders?status=waiting_sms

Your orders; optional status filter

Read
POST/orders

Reserve a number using a quote

Orders
GET/orders/{id}

Check number, status and received SMS

Read
POST/orders/{id}/cancel

Cancel before a supplier attempt begins

Orders
POST/orders/{id}/resend

Request another SMS when supported

Orders

Amounts and pagination

Currency is USD. Display amounts are strings with 4 decimal places. Integer *_units fields preserve exact amounts: 1 USD = 1,000,000 units. Use exact units for accounting and price comparisons; display strings are rounded. Lists use limit (1–100, default 50), offset and next_offset. A null next_offset means the last page.

Integration example

Use a service ID from /services and a country code from /countries. Quote IDs below are examples: always fetch a current quote before purchasing.

curl 'https://luckymonkey.cc/api/v1/prices?service=telegram&country=US'

curl -X POST 'https://luckymonkey.cc/api/v1/orders' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: 71f65109-689d-486e-8422-93d64a4230fb' \
  -d '{"price_id":123,"price_version":1,"max_price":"1.0000"}'

curl 'https://luckymonkey.cc/api/v1/orders/ORDER_UUID' \
  -H 'Authorization: Bearer YOUR_API_KEY' 

Order response · 202 Accepted

{
  "data": {
    "id": "36e4a486-9421-420b-847e-b59392f09d3d",
    "status": "allocating",
    "service": "telegram",
    "country": "US",
    "phone": null,
    "price": "0.7500",
    "price_units": 750000,
    "currency": "USD",
    "sms": []
  }
}

Order parameters

price_id and price_version are integers from /prices. The quote version prevents purchasing at a changed price. max_price is an optional positive decimal string, with up to 6 decimal places.

Safe retries

Send a UUID in Idempotency-Key for every new order. Retry the same body with the same UUID after a timeout: the API returns the existing order without another debit. Reusing a UUID with different fields returns 409. A new order requires a new UUID.

Order lifecycle

allocatingFunds reserved; a number is being allocated
allocation_pendingSupplier response is being reconciled; keep the same order ID
waiting_smsNumber issued; waiting for SMS
finalizingFinal SMS check at the end of the window
completedSMS received; payment captured
expiredNo SMS arrived; the reservation was released
failedNumber not issued, supplier ended the order or it was cancelled; reservation released

The receiving window is up to 20 minutes from issue; use expires_at in UTC. SMS completion and refunds happen automatically. An issued number cannot be manually refunded early. Cancellation is available only before any supplier attempt. Another SMS is available only for supported numbers before expiry.

Errors

Errors return the appropriate HTTP status and error.code, error.message and request_id. Codes are stable English identifiers. Do not retry a purchase with a new UUID after a connection error.

{
  "error": {"code": "insufficient_balance", "message": "Insufficient funds. Top up your balance."},
  "request_id": "f24f3aee-f574-4af3-a606-435b5042d0dc"
}
400Invalid JSON, quote parameters or UUID
401Key missing, expired, revoked or invalid
402Insufficient available balance
403Read-only key cannot create or change orders
404Resource not found or owned by another account
409Price changed, no stock, order limit or operation unavailable
429Rate limit; wait for Retry-After seconds
503Order processing temporarily unavailable

Limits

120 authenticated requests per minute per account across all keys; up to 10 order creation requests per minute. Public requests: 60 per minute per IP. Invalid keys: 30 per minute per IP. Poll each order no more than once every 5 seconds. Respect Retry-After and use a delay after network errors.

Protocol

This is the LuckyMonkey REST API v1 with asynchronous order creation. It is not a drop-in handler_api.php or 5SIM endpoint: use the documented URLs and OpenAPI schema.