Setting up the OTP API
One endpoint for send, one for verify. Most teams are live in under 30 minutes.
The OTP API is a narrow, opinionated pair of endpoints designed to do one thing extremely well: deliver a verification code and confirm it was entered correctly.
The two endpoints
- POST /v2/otp/send — takes a mobile number, generates or accepts a code, delivers over SMS (default), WhatsApp, or voice.
- POST /v2/otp/verify — takes the mobile number and the code the user typed, returns a true/false and a reason.
The API handles code generation, expiry (default 10 minutes), attempt limiting (default 5), resend cooldown (default 30 seconds), and idempotency. You don't store the code yourself.
Related articles in OTP & Transactional
Browse other help categories
Getting started
Create your account, add credits, and send your first message in under fifteen minutes.
SMS campaigns
Templates, DLT routing, sender IDs, delivery reports, scheduling, and retries.
WhatsApp Business API
Onboarding, template approval, chatbot flows, team inbox, quality rating, and analytics.
AI WhatsApp Agents
Train your agent, sync your catalogue, set handoff rules, and go multilingual.
Did this article help?
If something isn't clear or the steps don't match what you're seeing, tell us and we'll fix the doc the same day.