Developer API — v1

Automate number allocation with personal API keys. Create a key in your dashboard, then send it as a Bearer token.

Authentication

Authorization: Bearer djbs_your_key_here
# or
X-API-Key: djbs_your_key_here

Base URL: https://www.uroutlet.pk/api/v1 · Rate limit: 120 requests/minute · All responses are JSON with {"{"}"ok": true, "data": …{"}"}.

GET /balance

curl https://www.uroutlet.pk/api/v1/balance -H "Authorization: Bearer djbs_…"
→ {"ok":true,"data":{"balance":12.50,"currency":"USD"}}

GET /services

curl https://www.uroutlet.pk/api/v1/services -H "Authorization: Bearer djbs_…"
→ {"ok":true,"data":[{"id":"0003","name":"Microsoft","price":"0.50"}, …]}

POST /orders — allocate a number

curl -X POST https://www.uroutlet.pk/api/v1/orders \
  -H "Authorization: Bearer djbs_…" \
  -d "service_id=0003&country=us"
→ {"ok":true,"data":{"order_ref":"ORD-AB12CD34EF","phone":"+1…","status":"active", …}}

Your balance is charged only when the SMS arrives — the same rule as the web terminal.

GET /orders/{ref}/sms — poll for the code

curl https://www.uroutlet.pk/api/v1/orders/ORD-AB12CD34EF/sms -H "Authorization: Bearer djbs_…"
→ {"ok":true,"data":{"status":"received","code":"654321"}}
→ {"ok":true,"data":{"status":"waiting","code":null}}

POST /orders/{ref}/cancel

curl -X POST https://www.uroutlet.pk/api/v1/orders/ORD-AB12CD34EF/cancel \
  -H "Authorization: Bearer djbs_…" -d "mode=release"   # or mode=blacklist
→ {"ok":true,"data":{"status":"released"}}