What is OTP.ID?
OTP.ID gives you programmatic control over the full OTP lifecycle: request delivery, track status, and verify the code your user enters — all through a REST API served fromhttps://api.otp.id. Every request is authenticated with a Bearer API key tied to your merchant account, and billing is prepaid, meaning your balance is deducted only when a message is successfully sent.
Supported Channels
OTP.ID delivers one-time passwords across five channels:How the API Works
The OTP.ID API is organized around three core operations: creating an OTP, verifying it, and polling its status. All endpoints live under the/v3/ path prefix and accept and return JSON.
Creating an OTP
You have two ways to create an OTP depending on whether you want OTP.ID to generate the code or supply your own:POST /v3/request— OTP.ID generates a random code and delivers it to the user. This is the recommended approach for most use cases.POST /v3/send— You supply your own OTP code in the request body. Use this when you need to generate the code yourself (for example, to display it in your UI before delivery).
channel, a number (or email), and a brand name that appears in the delivered message.
Verifying an OTP
Once the user enters the code they received, callPOST /v3/verify with the otp_id returned from the creation step and the code the user submitted. OTP.ID checks the code against what was sent and returns a verified: true or verified: false result. A mismatch returns HTTP 200 — it is a valid response, not an error.
Polling Status
If you need to check the delivery state of an OTP without waiting for a webhook, callGET /v3/otp/{otp_id}. This is useful for polling patterns or for debugging delivery issues.
Async Notifications via Webhook
OTP.ID can push real-time events to your backend. When a code is successfully verified, OTP.ID fires anotp.verified webhook event to the URL you configure in your dashboard. This removes the need to poll for verification results in server-to-server flows.
The Response Envelope
Every response from the OTP.ID API — whether a success or an error — is wrapped in a consistent envelope:success is false, data is null, and error contains a machine-readable code and a human-readable message:
success first and branch from there, without inspecting HTTP status codes for every edge case.
Billing Model
OTP.ID uses a prepaid balance model. You top up your account balance in the dashboard, and each successful OTP delivery deducts the channel rate for that message. If a message fails to deliver, your balance is not charged. Thelast_balance field in every successful send response shows your remaining balance after the deduction, so you can monitor usage inline with your API calls.
Where to Go Next
Quickstart
Send and verify your first OTP in under 5 minutes with step-by-step curl examples.
Authentication
Learn how to obtain your API key and authenticate every request.
Channels
Understand the five delivery channels and choose the right one for your use case.
API Reference
Explore the full endpoint reference with request schemas and response examples.

