Skip to content

OTP / Verify API Overview

The Verify API lets you send and verify one-time passwords (OTPs) across multiple channels — SMS, WhatsApp, email, or automatically via smart channel routing. It handles code generation, storage, expiry, and rate limiting for you.

Base URL

https://sendapi.co/v1/verify

Authentication

Authorization: Bearer sk_live_YOUR_API_KEY

How It Works

  1. Send OTP (POST /v1/verify/send) — SendAPI generates a random code, stores its hash, and delivers it to the recipient via your chosen channel.
  2. Verify Code (POST /v1/verify/check) — Pass the code the user entered. SendAPI returns valid: true or valid: false.
  3. That's it — no state management required on your side.

Endpoints

MethodEndpointDescription
POST/v1/verify/sendSend an OTP
POST/v1/verify/checkVerify a submitted code
GET/v1/verify/status/{id}Get verification status
GET/v1/phone/validateValidate a phone number

Rate Limits

To prevent OTP bombing, the following limits are enforced per phone number regardless of your plan:

WindowLimit
Per hour5 OTPs
Per day20 OTPs

Exceeding these limits returns 429 Too Many Requests.

Smart Channel Routing

With channel: "auto", SendAPI picks the cheapest and most reliable channel for each destination:

  • WhatsApp when available (significantly cheaper than SMS)
  • SMS as a fallback
  • Email as the final fallback

Released under the MIT License.