POST
/
webhook
/
otp
/
send
Send OTP
curl --request POST \
  --url https://webhook.sit.onedigilta.in/webhook/otp/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "template_uuid": "a3eb7877-3d3f-4fe2-af4d-dedd54a55005",
  "to": {
    "email": [
      "test@example.com",
      "test2@example.com"
    ],
    "whatsapp_number": [
      "+91 0000000000",
      "+91 0101010101"
    ]
  },
  "otp_channel": "whatsapp",
  "subject": "otp auth",
  "otp": 808851,
  "sender": {
    "email_sender": "w-addon-testing@empowerwithemail.com",
    "whatsapp_sender": "+91 94494 41410"
  }
}
'
{
  "success": true,
  "message": "OTP sent successfully"
}

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.
{
  "success": true,
  "message": "OTP sent successfully"
}

Authorizations

Authorization
string
header
required

Use your API key with the 'Bearer ' prefix

Body

application/json
template_uuid
string<uuid>
required
Example:

"a3eb7877-3d3f-4fe2-af4d-dedd54a55005"

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
subject
string
required
Example:

"otp auth"

otp
integer
required

The One-Time Password to send.

Example:

808851

sender
object
required

Sender information for email and whatsapp.

Response

OTP sent successfully.

success
boolean
Example:

true

message
string
Example:

"OTP sent successfully"