Skip to content

RCS Message

RCS Business Messaging (RCS) is a Google RCS channel that supports rich messages: carousels, action buttons, images, and more. RCS messages are sent through a dedicated endpoint.

POST https://messaging.mahadata.io/v1/agents/{agent_id}/messages

Replace {agent_id} with your RCS agent UUID (obtained from the app.mahadata.io page Channels). This UUID is also used to validate that the agent actually belongs to your account.

{
"to": "6281234567890",
"rbm": {
"rich_message_id": "f7a816e2-8397-11f0-8e34-010203040506",
"rbm_agent_id": "a1b2c3d4-5678-9012-abcd-ef0123456789"
}
}
FieldTypeRequiredDescription
tostringYesRecipient phone number in E.164 format (without +)
rbmobjectYesRCS message object (contains rich_message_id and rbm_agent_id)
rbm.rich_message_idstring (UUID)YesRich message ID that has been configured in the portal
rbm.rbm_agent_idstring (UUID)YesUUID of the RCS agent used for sending. Should be the same as {agent_id} in the URL
sms_failoverobjectNoFallback SMS message if RCS is unavailable

If the recipient does not support RCS, the platform can send an SMS as a fallback:

{
"to": "6281234567890",
"rbm": {
"rich_message_id": "f7a816e2-8397-11f0-8e34-010203040506",
"rbm_agent_id": "a1b2c3d4-5678-9012-abcd-ef0123456789"
},
"sms_failover": {
"body": "Kode OTP Anda: 123456. Berlaku 5 menit."
}
}
FieldTypeRequiredDescription
bodystringYesContent of the fallback SMS message
Terminal window
curl -X POST https://messaging.mahadata.io/v1/agents/YOUR_RBM_AGENT_ID/messages \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"to": "6281234567890",
"rbm": {
"rich_message_id": "f7a816e2-8397-11f0-8e34-010203040506",
"rbm_agent_id": "a1b2c3d4-5678-9012-abcd-ef0123456789"
}
}'

Message received for processing with status 202 Accepted:

{
"messaging_product": "whatsapp",
"messages": [
{
"id": "msg_f7a816e2-8397-11f0-8e34-010203040506"
}
]
}
  1. message.status.sent — RCS message successfully sent
  2. message.status.delivered — Message reached the recipient’s device
  3. message.status.read — Message read by the recipient

If it fails, you receive message.status.failed.

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