The OTPBay API is a JSON REST API. Every endpoint page has a playground: paste your API key and send a real request.
Base URL
All requests use HTTPS.
Authentication
Send your project API key as a bearer token:
See Authentication to create a key and restrict it to your IP addresses.
Requests from the playground are real. They send real messages and charge your balance.
Endpoints
Conventions
- Requests are JSON with
Content-Type: application/json. Unknown fields are rejected.
- Phone numbers are international format and returned as E.164. See IDs and formats.
- IDs are
sid strings with a type prefix: VE, SM or TG.
- Amounts are US dollar strings with two decimals, such as
"0.02".
- Errors return
{ "error": { "code", "message" } }. See Errors.
- Webhooks send status updates to your
callback URL. See Webhooks.
OpenAPI specification
The full API is described in an OpenAPI 3.1 file, api-reference/openapi.yaml, in this documentation’s repository. Use it to generate a client or import the API into Postman or Insomnia.