Send OTP

Send an OTP to a mobile number using a predefined OTP template. You can customize the OTP length, expiry, and provide values for variables in your DLT template.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This endpoint allows you to send an OTP to a mobile number. You can either provide your own OTP or let Fast2SMS generate one for you.

Body Params
string
required
^[0-9]{10}$

10-digit Indian mobile number.

string
required

Your unique OTP Template ID.

integer
1 to 10080
Defaults to 15

OTP expiry time in minutes (Min: 1, Max: 10080, Default: 15).

integer
4 to 10
Defaults to 6

OTP length (Min: 4, Max: 10, Default: 6).

string

Optional: Pass your own OTP value if you don't want Fast2SMS to generate otp. (max 10)

string

Values of {#var#} variables used in the DLT template (if any), separated by pipe (|).

string

User Defined Field 1 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking.

string

User Defined Field 2 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking.

string

User Defined Field 3 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking.

Headers
string
required
Defaults to YOUR_API_KEY

Provide "YOUR_API_KEY".

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json