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 credits are 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 for message-based outbound channels only: WhatsApp, SMS, and Email.
channel, a destination, and an optional brand name for channels that deliver a message. destination can be either a phone number or an email address, depending on the channel. The legacy number field is still accepted for backward compatibility, but new integrations should use destination. For misscall, use POST /v3/request only; brand is not needed because the user verifies from the caller ID.
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 registered for your account (see the Webhooks guide). 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 credit model. You top up your credits in the dashboard, and each successful OTP delivery deducts the channel rate for that message. If a message fails to deliver, no credits are deducted (whatsapp_inbound is the one exception — it is charged when the transaction is created; see Billing). The last_balance field in every successful send response shows your remaining credits 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.

