Reseller API

API documentation

Sell virtual numbers from your own website. Orders are paid from your BeReal SMS wallet, with your reseller discount already taken off.

  1. Create an account and fund your wallet.
  2. Go to Profile → Reseller API and create a key. Copy it straight away — it is shown once.
  3. Send the key in every request header.
Base URL: https://berealsms.com/api/public/reseller

Authorization: Bearer iss_live_xxxxxxxxxxxxxxxx
curl https://berealsms.com/api/public/reseller/balance \
  -H "Authorization: Bearer iss_live_xxxxxxxxxxxxxxxx"

Amounts are in kobo (₦1 = 100). Servers are a to h.

GET/balance

Your wallet balance.

Response

{ "balance_cents": 250000, "currency": "NGN" }

GET/servers

Servers your key can use (Server A to Server H).

Response

{ "servers": [ { "id": "b", "name": "Server B" } ] }

GET/servers/{server}/countries

Countries available on a server.

Response

{ "countries": [ { "code": "england", "name": "United Kingdom" } ] }

GET/servers/{server}/services

Services and prices on a server. Prices include your reseller discount.

  • country — required for every server except A

Response

{ "services": [ { "service": "whatsapp", "price_cents": 120000, "your_price_cents": 108000, "stock": 341 } ] }

POST/orders

Buy a number. The price is taken from your wallet.

Body

{ "server": "b", "service": "whatsapp", "country": "england", "operator": "any" }

Response

{ "order": { "id": "…", "phone_number": "+447…", "status": "waiting", "cost_cents": 108000 } }

GET/orders

Your recent API orders.

  • limit — up to 100 (default 50)

Response

{ "orders": [ … ] }

GET/orders/{id}

Check an order. Also asks the server for a new SMS, so poll this every 5–10 seconds.

Response

{ "order": { "id": "…", "status": "received", "sms_code": "354690", "sms_text": "Your WhatsApp code 354-690" } }

POST/orders/{id}/cancel

Cancel an order with no code. Allowed 3 minutes after buying. You get back exactly what you paid.

Response

{ "order": { "id": "…", "status": "cancelled" }, "refunded_cents": 108000 }

Errors

{ "error": "insufficient_funds", "message": "Not enough balance" }
401unauthorizedMissing, wrong or disabled API key
403scope_forbiddenYour key can't use that server
400bad_request / country_requiredSomething in the request is missing or wrong
402insufficient_fundsNot enough money in your wallet
404not_found / invalid_serverOrder or server doesn't exist
502purchase_failed / upstream_errorThe server couldn't give a number — you were refunded