Skip to main content

Send VOTP

This API allows you to send a VOTP (Voice One-Time Password) message.

📍 Endpoint

POST {base_url}/api/send

🧾 Headers

KeyValue
AuthorizationYOUR_TOKEN_HERE
Content-Typeapplication/json

📤 Request Body

{
"sending_type": "votp",
"message": "45852",
"params": {
"recipients": [
"+989120000000"
]
}
}

📝 Parameters

ParameterTypeRequiredDescription
sending_typestringYesType of sending, must be "votp" for this endpoint
messagestringYesMessage content to be sent, typically a one-time password (OTP), such as "45852"
paramsobjectYesObject containing recipients and other optional parameters
recipientsarrayYesList of recipient phone numbers in E.164 format (e.g., +989120000000), only one recipient is allowed for VOTP

📝 Notes

  • The from_number must be a valid sender number assigned to your account.
  • The recipients array must contain valid phone number in E.164 format.

✅ Success Response

{
"data": {
"message_outbox_ids": [
1123594208
]
},
"meta": {
"status": true,
"message": "انجام شد",
"message_parameters": [],
"message_code": "200-1"
}
}

❌ Error Response — Invalid or Expired Token (401)

{
"data": null,
"meta": {
"status": false,
"message": "اطلاعات وارد شده صحیح نمی باشد",
"message_parameters": [],
"message_code": "400-1",
"errors": {}
}
}

❌ Error Response — Invalid Request (422)

{
"data": null,
"meta": {
"status": false,
"message": "تکمیل گزینه پیام الزامی است",
"message_parameters": [],
"message_code": "400-2",
"errors": {
"message": [
"تکمیل گزینه پیام الزامی است"
]
}
}
}

🧪 Example Request

curl --location '{base_url}/api/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: API TOKEN' \
--data '{
"sending_type": "votp",
"message": "45852",
"params": {
"recipients": [
"+989120000000"
]
}
}'