RCS Single Message API
The RCS Single Message API allows 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
-
RCS Business Account: Share your business details with the Msgkart team so they can enable RCS messaging on your behalf:
- TenantId / BusinessId
- Template Name
-
Msgkart Account: An active Msgkart account with API Key or Bearer Token authentication.
Request Syntax
POST /api/v3/message/{tenantId}/template/rcs
Request Headers
x-api-key: <API KEY>
Content-Type: application/json
Request Body
{
"message": {
"messageType": "template",
"name": "msgkart_admin",
"language": "en_US",
"components": [
{
"componentType": "header",
"parameters": [
{
"type": "media",
"mediaId": "{{mediaUrl}}",
"mediaType": "image"
}
]
},
{
"componentType": "body",
"parameters": [
{
"type": "text",
"text": "{{text}}"
},
{
"type": "text",
"text": "Test value"
}
]
}
]
},
"to": "9999999999"
}
Response Body
{
"messageId": "rcs-5e2a9c41-bd7-8f1e-91b8f2d9a0ef"
}
Properties
| Property | Type | Required | Description |
|---|---|---|---|
message.messageType | string | Yes | Type of message (e.g. "template"). |
message.name | string | Yes | Approved RCS template name. |
message.language | string | Yes | Language code (e.g. "en_US"). |
message.components | array | Yes | Array of component objects (header, body, button). |
to | string | Yes | Recipient phone number (without leading +). |
Examples
Sample Request (cURL)
curl --location 'https://alb-backend.msgkart.com/api/v3/message/<TENANT ID>/template/rcs' \
--header 'x-api-key: <API KEY>' \
--header 'Content-Type: application/json' \
--data '{
"message": {
"messageType": "template",
"name": "msgkart_admin",
"language": "en_US",
"components": [
{
"componentType": "header",
"parameters": [
{
"type": "media",
"mediaId": "https://scontent.whatsapp.net/v/t61.29466-34/435061426_1113953846871534_7756253713572728880_n.png",
"mediaType": "image"
}
]
},
{
"componentType": "body",
"parameters": [
{
"type": "text",
"text": "Test value"
},
{
"type": "text",
"text": "Test value"
}
]
}
]
},
"to": "9999999999"
}'