RCS Send Message API
Use the RCS Send Message API to send text, media, rich cards, carousels, and suggested actions through an RCS-enabled bot.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/rcs/v1/message |
| Method | POST |
| Content-Type | application/json |
| Authentication Required | Yes |
Authentication
Pass a valid access token in the Authorization header.
Request headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json. |
| Authorization | Yes | Valid access token for authentication. |
Message types
Send a text-only RCS message.
Send a single rich card with media, text, and suggestions.
Send multiple rich cards in a carousel format.
Send media messages such as PDF, image, or video through a public URL.
Send tappable actions such as location, dialer, and URL suggestions.
Request examples
Rich Card (Standalone)
Send a single rich card message with interactive suggestions such as view location. Rich cards are visually enhanced messages with media, text, and action buttons.
Request body
{
"type": "card",
"phone_no": "919XXXXXXXXX",
"bot_name": "DemoBot",
"extra": "{extravalue}",
"card": {
"title": "Greetings",
"description": "RMLtest",
"url": "https://example.com/card-image.jpg",
"suggestions": [
{
"type": "view_location",
"text": "Mumbai",
"latitude": "19.0760",
"longitude": "72.8777",
"postback": "test"
}
]
}
}Response
{
"message": "Message request has been created",
"id": "9f8d32c0-1f60-11f0-8d0c-0a58a9fedgrc02"
}Rich Card (Carousel)
Send multiple rich cards with interactive suggestions such as message replies, calendar actions, dial actions, and URL actions.
Request body
{
"type": "multiple_cards",
"phone_no": "{phone}",
"bot_name": "Routemobile",
"extra": "{extravalue}",
"cards": [
{
"card": {
"title": "testing",
"description": "Testing123",
"url": "https://example.com/image1.jpg"
},
"suggestions": [
{
"type": "message",
"text": "hello",
"postback": "postbacktext"
},
{
"type": "message",
"text": "text",
"postback": "postbacktext"
},
{
"type": "calendar",
"postback": "postbacktext",
"text": "Savetocalendar",
"start": "2023-04-1800:00:00",
"end": "2023-04-1800:00:00",
"title": "titlename",
"description": "Descriptionofthecalendarevent"
}
]
},
{
"card": {
"title": "greetings",
"description": "testing",
"url": "https://example.com/image2.jpg"
},
"suggestions": [
{
"type": "dial",
"text": "label",
"call_to": "+917718963553",
"postback": "postbacklabel"
}
]
},
{
"card": {
"title": "label",
"description": "plaintext",
"url": "https://example.com/image3.jpg"
},
"suggestions": [
{
"type": "url",
"text": "Click",
"url": "https://routemobile.com/products/messaging/",
"postback": "postbacklabel"
}
]
}
]
}Response
{
"message": "Message request has been created",
"id": "9f8d32c0-1f60-11f0-8d0c-0a58a9fedgrc02"
}Notification Media - PDF/Image/Video
Send media messages such as image, video, or PDF. The media content is delivered through a publicly accessible URL.
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Must be media. Specifies the type of message being sent. |
| phone_no | string | Yes | The recipient's phone number in international format, for example +32XXXXXX. |
| bot_name | string | Yes | The name of the bot sending the message. |
| url | string | Yes | Public URL to the media file to be sent. |
Request body
{
"type": "media",
"phone_no": "+32XXXXXX",
"bot_name": "RML_Promo",
"url": "https://"
}Response
{
"message": "Message request has been created",
"id": "9f8d32c0-1f60-11f0-8d0c-0a58a9fedgrc02"
}Suggestion with Location Share
Share a location with customers to help with product exchanges, address queries, or store discovery.
Request body
{
"type": "text",
"phone_no": "+32XXXXXX",
"text": "Handysuggestions",
"bot_name": "XXXXXXX",
"suggestions": [
{
"type": "view_location",
"text": "Mumbai",
"latitude": 19.076090,
"longitude": 72.877426,
"postback": "Nice"
}
]
}Response
{
"success": true,
"message_id": "1234567890abcdef",
"status": "Messagesentsuccessfully"
}Error response
{
"success": false,
"error": "Invalid phone number format"
}Dialer Suggestion
Share a support phone number with customers so they can call your brand from the RCS message.
Request body
{
"type": "text",
"phone_no": "+32XXXXXXXX",
"text": "Hello from RouteMobile",
"bot_name": "RML_Promo",
"suggestions": [
{
"type": "dial",
"text": "Callus",
"call_to": "+917718963553",
"postback": "Callus"
}
]
}Response
{
"success": true,
"message_id": "1234567890abcdef",
"status": "Messagesentsuccessfully"
}Error response
{
"success": false,
"error": "Invalid phone number format"
}URL Suggestion
Share website links or application links with users. Users can open the URL from the RCS message.
Request parameters
| Parameter | Type | Description |
|---|---|---|
| type | string | Type of the message. For text messages, use text. |
| phone_no | string | Recipient's phone number in international format, for example +32XXXXXXXX. |
| text | string | The message content to be sent. |
| bot_name | string | Name or identifier of the bot sending the message. |
| suggestions | array | Array of suggestion objects that appear as interactive buttons. |
| suggestions.type | string | Type of suggestion, for example url. |
| suggestions.text | string | Label displayed on the suggestion button, for example Visit Website. |
| suggestions.url | string | URL opened when the suggestion is clicked. Must include http:// or https://. |
| suggestions.postback | string | Data returned when the suggestion is clicked, used for tracking user interaction. |
Request body
{
"type": "text",
"phone_no": "+32XXXXXXXX",
"text": "Hello from RouteMobile",
"bot_name": "XXXXXXX",
"suggestions": [
{
"type": "url",
"text": "{label}",
"url": "{url with http://}",
"postback": "{postback label}"
}
]
}Response
{
"success": true,
"message_id": "1234567890abcdef",
"status": "Messagesentsuccessfully"
}Error response
{
"success": false,
"error": "Invalid phone number format"
}Updated 11 days ago