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

FieldValue
URLhttps://apis.rmlconnect.net/rcs/v1/message
MethodPOST
Content-Typeapplication/json
Authentication RequiredYes

Authentication

Pass a valid access token in the Authorization header.

Request headers

HeaderRequiredDescription
Content-TypeYesMust be application/json.
AuthorizationYesValid access token for authentication.

Message types

Plain text message

Send a text-only RCS message.

Rich card standalone

Send a single rich card with media, text, and suggestions.

Rich card carousel

Send multiple rich cards in a carousel format.

Notification media

Send media messages such as PDF, image, or video through a public URL.

Suggested actions and responses

Send tappable actions such as location, dialer, and URL suggestions.

Request examples

Send Plain Text Message

Send a plain text message to a user through RCS.

Request body

{
  "type": "text",
  "phone_no": "{phone}",
  "bot_name": "XXXX",
  "text": "test message"
}

Response

{
  "message": "Message request has been created",
  "id": "9f8d32c0-1f60-11f0-8d0c-0a58a9fedgrc02"
}
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

FieldTypeRequiredDescription
typestringYesMust be media. Specifies the type of message being sent.
phone_nostringYesThe recipient's phone number in international format, for example +32XXXXXX.
bot_namestringYesThe name of the bot sending the message.
urlstringYesPublic 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

ParameterTypeDescription
typestringType of the message. For text messages, use text.
phone_nostringRecipient's phone number in international format, for example +32XXXXXXXX.
textstringThe message content to be sent.
bot_namestringName or identifier of the bot sending the message.
suggestionsarrayArray of suggestion objects that appear as interactive buttons.
suggestions.typestringType of suggestion, for example url.
suggestions.textstringLabel displayed on the suggestion button, for example Visit Website.
suggestions.urlstringURL opened when the suggestion is clicked. Must include http:// or https://.
suggestions.postbackstringData 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"
}


Did this page help you?