REST API

Every account gets an API key on sign-up. Send it as x-api-key or Authorization: Bearer <key>. All responses are JSON.

Pricing

  • $1 = 100 points.
  • 10 points per successfully delivered number.
  • Cancel before the OTP arrives and the points come straight back.
  • Sessions expire automatically after 20 minutes and are refunded if no OTP arrived.
  • Fair use: cancel is allowed after a 2-minute hold, max 10 cancellations per hour.

Base URL

https://rapidagency.in

Prefix every path below with the base URL. All requests are served directly by us — there is no third-party endpoint to call.

POST/api/public/v1/numbers

Charges 10 points per delivered number. Anything undelivered is never charged.

Request body

{ "quantity": 2 }

Response

{
  "requested": 2,
  "delivered": 2,
  "numbers": [
    { "id": "…", "number": "+919876543210", "status": "ASSIGNED", "expires_at": "…" }
  ],
  "errors": []
}
GET/api/public/v1/otp?session_id=<uuid>

Poll every 1–3 seconds. Returns status WAITING until the SMS lands.

Request body

Response

{ "session_id": "…", "status": "OTP_RECEIVED", "otp": "483920" }
POST/api/public/v1/cancel

Full 10-point refund as long as no OTP has been received yet. Allowed after a 2-minute minimum hold, up to 10 cancellations per hour.

Request body

{ "session_id": "<uuid>" }

Response

{ "session_id": "…", "status": "SKIPPED", "refunded": true }

Example

curl -X POST https://rapidagency.in/api/public/v1/numbers \
  -H "x-api-key: otpc_xxxxxxxxxxxx" \
  -H "content-type: application/json" \
  -d '{"quantity":1}'