application/json

Body Required

  • phone string
  • message string
  • api_key string

Responses

  • 200 application/json

    OTP Sent Successfully

    Hide response attributes Show response attributes object
    • status string
    • otp_id string
  • 400

    Invalid Request

  • 401

    Unauthorized

POST /sendOTP
curl \
 --request POST 'https://api.fast2sms.com/sendOTP' \
 --header "Content-Type: application/json" \
 --data '{"phone":"9876543210","message":"Your OTP is {OTP}","api_key":"your_api_key_here"}'
Request examples
{
  "phone": "9876543210",
  "message": "Your OTP is {OTP}",
  "api_key": "your_api_key_here"
}
Response examples (200)
{
  "status": "success",
  "otp_id": "123456"
}