POST
Send OTP

Send OTP

Use this endpoint to send an One-Time Password (OTP) to a user via WhatsApp or Email. This endpoint requires a template UUID and recipient details.

Request Body

  • to: An object containing the recipient’s information.
    • email: A list of recipient email addresses.
    • whatsapp_number: A list of recipient WhatsApp numbers.
  • otp_channel: The channel through which the OTP should be sent (email or whatsapp).
  • template_uuid: The unique identifier of the template to be used for the OTP.
  • subject: The subject line for the OTP message.
  • otp: The One-Time Password to send.
  • sender: An object containing sender details.
    • email_sender: The sender’s email address.
    • whatsapp_sender: The sender’s WhatsApp number.

Response

The API will return a success message if the OTP is queued for sending.

Authorizations

Authorization
string
header
required

Use your API key with the 'Bearer ' prefix

Body

application/json
template_uuid
string<uuid>
required
to
object
required

Recipient information. Use 'email' for Email channel or 'whatsapp_number' for WhatsApp channel.

otp_channel
enum<string>
default:whatsapp
required

Channel for OTP. email or whatsapp.

Available options:
email,
whatsapp
otp
integer
required

The One-Time Password to send.

sender
object
required

Sender information for email and whatsapp.

subject
string

Response

OTP sent successfully.

success
boolean
Example:

true

message
string
Example:

"OTP sent successfully"