otp/docs

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

quickstart.sh
# 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

StatusMeaning
200Success.
201Activation created.
400Invalid request.
401Missing or invalid API key.
402Insufficient wallet balance.
404Resource not found.
429Rate limit or concurrency cap reached.
5xxTemporary server error — retry.

New here? Start with Authentication, then read the activation lifecycle.

On this page