Send OTP
Send OTP
POST
https://api.oneroute.io/api/oneotp/send
Send OTPs to customers with this endpoint. Provide the template, channels, recipient and indicate whether you'd like to generate your OTP or use the generated OTP.
Headers
Name | Type | Description |
---|---|---|
apikey | string | API Key for Authentication. |
Request Body
Name | Type | Description |
---|---|---|
channels | array | A list of channels to send the OTP to. Allowed values are "WHATSAPP", "EMAILS", "SMS" and "USSD" |
templateId | string | OTP Template to send to customer. |
string | Email to send OTP to, if EMAIL channel is selected. | |
options.otp | string | OTP to use, overwrites the generated OTP. |
options.length | number | Length of generated OTP. Defaults to 4 |
options.digits | boolean | If generated OTP should contain digits. Defaults to true. |
options.alphabets | boolean | If generated OTP should contain alphabets. Defaults to false |
options.upperCase | boolean | If generated OTP should contain upperCase letters. Defaults to false. |
options.specialChars | boolean | If generated OTP should contain special characters. Defaults to false |
options.minutes | number | Number of minutes the OTP should last. Defaults to 5 minutes. |
phoneNumber | string | The phone number to send WHATSAPP, SMS or USSD to. Required if any of those channels are selected. |
Example Request Payload
Last updated