Chuyển tới nội dung chính

Voice OTP Message API

This document provides guidance on how to use the API to send Voice OTP messages.

📝 Description​

This API allows sending Voice OTP messages to a specific phone number using a pre-configured brand.


  • Method: POST
  • Endpoint: https://your.domain.com/api/public/sms/send
  • Authentication Required: Authorization: Basic {API_KEY}

🔐 Required Headers​

NameValueRequired
AuthorizationBasic {API_KEY}✅

📦 Request Body​

{
"phone": "84xxxxxxx",
"msg": "Message content",
"brand": "ABC",
"tracking_id": "123456789"
}

FieldTypeDescriptionRequired
phonestringRecipient's phone number in the format 84x or Ox✅
datastringThe content of the message to be sent✅
brandstringThe registered and activated brand name✅
tracking_idstringCustomer's message ID❌

✅ Successful Response​

HTTP Code: 200

  • HTTP Code: 200
{
"message": "Send message succes",
"msg_id": "e7c57cd5-77f9-4a45-9b51-4dce26de2199",
"status": "200"
}
  • Meaning: The message has been processed and queued for delivery.

❌ Error Response​

  • HTTP Code: 400
{
"message": "User not found",
"status": "-400"
}

💻 Example Voice Call Message Request​

curl -X POST https://your-domain.com/api/v1/sms/send \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "84901234567",
"msg": "Wishing you a great day!",
"brand": "ABC_CORP",
"tracking_id": "123456789"
}'


📌 Ghi chú​

  • Domain: depending on each customer, there will be different domains. The domain will be provided upon integration.
  • Key: will be provided upon integration.