Skip to content

SMS Message

SMS messages are sent via the Jatis channel. Mahadata provides two sending endpoints: a per-sender endpoint (recommended) and a legacy endpoint. The platform supports three SMS categories: Marketing, Alert, and OTP.

POST https://messaging.mahadata.io/v1/senders/{sms_sender_id}/messages

This is the recommended endpoint. Replace {sms_sender_id} with your SMS sender ID UUID (obtained from the app.mahadata.io page Channels).

The supplier (Jatis, IOH, 1E) and channel category are determined by the sender ID registration — so the request body only contains the destination and message content, without any sms_channel.

{
"to": "6281234567890",
"text": "Kode OTP Anda: 123456. Berlaku 5 menit."
}
FieldTypeRequiredDescription
tostringYesRecipient phone number in E.164 format (without +) or local format (will be normalized)
textstringYesSMS message content. Must be GSM-7 compatible, max 580 septets
uploadbystringNoOperator PIC / attribution. Default: "mahadata"
Terminal window
curl -X POST https://messaging.mahadata.io/v1/senders/YOUR_SMS_SENDER_ID/messages \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"to": "6281234567890",
"text": "Kode OTP Anda: 123456. Berlaku 5 menit."
}'
POST https://messaging.mahadata.io/v1/sms/messages

The legacy endpoint (deprecated, retained for compatibility) does not use a sender ID in the path. Instead, the channel category and logical sender are sent in the body. For new integrations, use the per-sender endpoint above.

{
"to": "6281234567890",
"text": "Kode OTP Anda: 123456. Berlaku 5 menit.",
"sms_channel": 2
}
FieldTypeRequiredDescription
tostringYesRecipient phone number in E.164 format (without +) or local format (will be normalized)
textstringYesSMS message content. Must be GSM-7 compatible, max 580 septets
sms_channelnumberNoChannel category: 0 = Marketing (default), 1 = Alert, 2 = OTP
sms_senderstringNoOverride the logical sender name. If not filled, uses the tenant default
uploadbystringNoOperator PIC / attribution. Default: "mahadata"
ValueCategoryDescription
0Marketing / NormalPromotional and marketing SMS (default)
1AlertNotifications and alerts
2OTPOne-Time Password and verification

Example: Marketing SMS with Custom Sender (legacy)

Section titled “Example: Marketing SMS with Custom Sender (legacy)”
{
"to": "6281234567890",
"text": "Promo spesial! Diskon 50% untuk semua produk. Berlaku hingga 30 Juni 2026. Info: example.com",
"sms_channel": 0,
"sms_sender": "BRAND-NAME",
"uploadby": "marketing-team"
}
{
"messaging_product": "sms",
"messages": [
{
"id": "msg_f7a816e2-8397-11f0-8e34-010203040506"
}
]
}
  1. message.status.sent — SMS successfully sent to the operator (telco submit)
  2. message.status.delivered — SMS reached the recipient’s device (handset delivery)

If it fails at either the telco submit or handset delivery stage, you receive message.status.failed.

See the page Webhook for details on the payload format of each event.