Skip to main content

Rcs Single Message API

The Rcs Single Message API allow businesses to send pre-approved Rcs message templates to end users using their Rcs Business account. These APIs support customizable components like text, media, buttons, and dynamic parameters for personalized communication.


Prerequisites
  1. Rcs Business Account: Share the following details with the Msgkart team so they can send messages on your behalf:

    • BusinessId
  2. Msgkart Account: Once you share the above details, the Msgkart team will create an account for you and provide an API Key.


RCS Template Id Variables

The templateId is the approved RCS template ID from the Msgkart portal, and the components array must match the template structure.

Request Syntax

POST /api/v1/message/<RCS BUSINESS ID>/template/rcs?channel=rcs

Request headers

    "x-api-key": "<API KEY>"

Request Body

{
"message": {
"messageType": "rcs_message",
"templateId": "templateId",
"components": [
{
"type": "BODY",
"variables": [
{
"type": "text",
"value": "${name}"
}
]
}
],
"rcsMessageType": "RICHCARD_STANDALONE"
},
"to": "+919999999999"
}

Response Body

{
"transactionId": "7c9e8a12-4f6d-4b3e-9a21-0c9f87a6d312",
"messageId": "rcs-5e2a9c41-bd74-4c6a-8f1e-91b8f2d9a0ef"
}


RCS Template Id

Sends an RCS message based on a pre-approved template ID, where the message structure and variables must match the template configuration.

Request Syntax

POST /api/v1/message/<RCS BUSINESS ID>/template/rcs?channel=rcs

Request headers

    "x-api-key": "<API KEY>"

Request Body

{
"message": {
"messageType": "rcs_message",
"templateId":"templateId",
"rcsMessageType": "RICHCARD_STANDALONE"
},
"to":"+919999999999"
}

RCS Text

Sends a plain text RCS message without templates, media, or components.

Request Syntax

POST /api/v1/message/<RCS BUSINESS ID>/template/rcs?channel=rcs

Request headers

    "x-api-key": "<API KEY>"

Request Body

{
"message": {
"messageType":"rcs_message",
"text": "Hello World",
"rcsMessageType": "TEXT"
},
"to":"+919999999999"
}

Response Body

{
"transactionId": "7c9e8a12-4f6d-4b3e-9a21-0c9f87a6d312",
"messageId": "rcs-5e2a9c41-bd74-4c6a-8f1e-91b8f2d9a0ef"
}


RCS Rich Card

Sends a standalone RCS Rich Card message containing media, description text, and interactive action buttons.

Request Syntax

POST /api/v1/message/<RCS BUSINESS ID>/template/rcs?channel=rcs

Request headers

    "x-api-key": "<API KEY>"

Request Body

{
"message": {
"messageType": "rcs_message",
"richCard": {
"standaloneCard": {
"cardContent": {
"description": "Dear Person,\nI hope this message finds you well. This is a friendly reminder regarding the pending payment for Loan #12345, due on 25 July 2024. As of today, the payment is 2 days overdue.",
"media": {
"contentInfo": {
"fileUrl": "{Valid File URL}",
"forceRefresh": "false"
},
"fileName": "Logo",
"height": "TALL"
},
"suggestions": [
{
"action": {
"postbackData": "Pay Now",
"text": "Pay Now",
"openUrlAction": {
"url": "{Valid URL}"
}
}
}
],
"title": "Hello, world!"
},
"cardOrientation": "VERTICAL",
"thumbnailImageAlignment": "RIGHT"
}
},
"rcsMessageType": "RICHCARD_STANDALONE"
},
"to": "+919999999999"
}

Response Body

{
"transactionId": "7c9e8a12-4f6d-4b3e-9a21-0c9f87a6d312",
"messageId": "rcs-5e2a9c41-bd74-4c6a-8f1e-91b8f2d9a0ef"
}

Properties

PlaceholderDescriptionSample
messageTypeType of message being sent. Always rcs_messagercs_message
rcsMessageTypeType of RCS message (TEXT, RICHCARD_STANDALONE)TEXT
templateIdApproved RCS template ID from Msgkart portal (optional)templateId
textPlain text message content (TEXT messages only)Hello from Msgkart
richCardRich card payload for RCS rich messages{...}
toEnd user mobile number with country code+919999999999