Documentation
POST /otp/resend
Advance the same verification to the next enabled channel after a cooldown, so a code that did not get through gets another route.
Advance the same OTP to the next enabled channel after a cooldown. The response has the same shape as send, with
the new channel. Pass an optional channel to move the OTP onto a specific
channel instead of the next one. You do not re-send client_ip: the resend is
evaluated with the IP declared on the original send.
curl -X POST https://api.otp.com/api/v1/otp/resend \
-H "Authorization: Bearer otp_live_•••" \
-H "Content-Type: application/json" \
-d '{"otp_id":"9f3c1b2a-…"}'
Request body
| Field | Type | Required | Description |
|---|---|---|---|
otp_id |
string | yes | The id of the verification to advance. |
channel |
string | no | Move the OTP onto this exact channel (sms, whatsapp, telegram, email) instead of advancing to the next one. Must be enabled for your app and the recipient. |
Verify by SMS when the user has no WhatsApp
WhatsApp needs the user to open the action_url to receive their code, so a user
without WhatsApp (or one whose code does not arrive) cannot complete it there.
Resend with {"otp_id":"…","channel":"sms"} to move that pending OTP onto SMS: it
delivers a fresh code and the response comes back with action_url: null, so you
continue with the normal verify step. This is a user-initiated
switch (WhatsApp still never auto-falls-back on its own).
Response
{
"otp_id": "9f3c1b2a-…",
"status": "pending",
"channel": "whatsapp",
"masked_recipient": "+1****71",
"action_url": "https://wa.me/13845555555?text=Verify%20me%3A%20aB3xZ-…"
}
channel reflects the next channel in your order. On SMS, email, and Telegram the
same code is re-issued; a fresh code is not generated. When the next channel is
WhatsApp the response returns an action_url the user opens to receive the code
over chat, and a later resend re-returns the same link. WhatsApp is terminal: once
an OTP is on WhatsApp, resend does not advance it to another channel.
Common errors
| Status | Type | When |
|---|---|---|
409 |
ResendNotAllowedError |
No further channel to fall back to. |
429 |
ResendCooldownError |
Resend attempted within the cooldown window. |
See How verification works for the fallback model, or Error codes for the full list.