Skip to main content
POST
/
send-otp
curl --request POST \
  --url https://api.authentica.sa/api/v2/send-otp \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '
{
  "method": "sms",
  "phone": "+966551234567",
  "template_id": 31
}
'
{
  "success": true,
  "data": null,
  "message": "OTP send successfully"
}

Authorizations

X-Authorization
string
header
required

API key for authentication. Get Your API Key

Body

application/json
method
enum<string>

Delivery method for the OTP. Required if no default channel is configured.

Available options:
sms,
whatsapp,
email
Example:

"sms"

phone
string

Valid international phone number. Required if method is sms or whatsapp.

Pattern: ^\+[1-9]\d{1,14}$
Example:

"+966551234567"

email
string<email>

Valid email address. Required if method is email.

Example:

"user@example.com"

template_id
integer
default:1

Template ID for the OTP message. Default is 1.

Example:

31

Response

OTP sent successfully

success
boolean
Example:

true

data
object
message
string
Example:

"OTP send successfully"