OTP API
Receive SMS one-time-passwords programmatically — pick a service and country, buy a number, then poll until the code arrives.
A REST API for receiving SMS one-time-passwords programmatically. Pick a service
and country, buy a number, then poll until the code arrives. Every call is
authenticated with a bearer API key. The base URL is https://api.otp.black.
Principles
- Every request carries a bearer API key.
- Prices are USD, returned as decimal strings (e.g.
"0.65"). - Buy a number, poll its status, and get the code when it lands.
- Activations time out server-side — a no-code refund is automatic.
- Responses are JSON; timestamps are ISO 8601 UTC.
Quickstart
# 1. Create an API key in your dashboard, then browse the catalog
curl https://api.otp.black/v1/services \
-H "Authorization: Bearer $API_KEY"
# 2. Check the price for a service + country
curl "https://api.otp.black/v1/prices?service=whatsapp&country=us" \
-H "Authorization: Bearer $API_KEY"
# 3. Buy a number
curl -X POST https://api.otp.black/v1/activations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"service":"whatsapp","country":"us"}'
# 4. Poll until the code arrives
curl https://api.otp.black/v1/activations/act_123 \
-H "Authorization: Bearer $API_KEY"Status codes
| Status | Meaning |
|---|---|
200 | Success. |
201 | Activation created. |
400 | Invalid request. |
401 | Missing or invalid API key. |
402 | Insufficient wallet balance. |
404 | Resource not found. |
429 | Rate limit or concurrency cap reached. |
5xx | Temporary server error — retry. |
New here? Start with Authentication, then read the activation lifecycle.