Create Template API documentation
Use these RCS template APIs to create, update, check, delete, and retrieve Basic Text, Rich Card, and Carousel templates.
Endpoint details
| Field | Value |
|---|---|
| Template create/update URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template |
| Get templates URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template |
| Content-Type | application/json |
| Authentication Required | Yes |
Authentication
Pass a valid access token in the Authorization header.
Request headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Valid access token for authentication. |
| Content-Type | Yes | Must be application/json. |
Template workflows
Create or update text message templates.
Create or update rich card templates with media and suggestions.
Create or update carousel templates with multiple rich cards.
Check whether a submitted template is approved, rejected, or pending.
Delete unused templates.
Retrieve templates created for a specific agent or bot.
Template API examples
Create Basic Text Message Template
Messages containing up to 160 characters are categorized as Basic messages. Any content exceeding this limit or any rich content will be treated and billed as a Rich message.
This feature is available for both international agents and India - Jio agents.
RCS text templates provide a way to create engaging and interactive messaging experiences for businesses.
Endpoint details
| Field | Value |
|---|---|
| Endpoint URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template |
| Method | POST |
| Content-Type | application/json |
| Authentication Required | Yes |
Request body
{
"name": "text_temp_7",
"type": "text_message",
"textMessageContent": "Timetogobigorgohomebecauseit'sIndiaVSAustraliaFINALS!",
"suggestions": [],
"templateDetails": {
"bot_name": "XXXXXX",
"variables": [],
"category": "text",
"payload": {}
}
}Error response
No error response example is provided for this operation.
Update Basic Text Message Template
Any content exceeding 160 characters, text with buttons, or content with rich elements will be treated and billed as a Rich message.
This feature is available for both international agents and India - Jio agents.
While the template is in a pending state awaiting operator approval, content modifications can still be made if required.
Endpoint details
| Field | Value |
|---|---|
| Endpoint URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template |
| Method | PUT |
| Content-Type | application/json |
| Authentication Required | Yes |
Request body
{
"name": "text_temp_7",
"type": "text_message",
"textMessageContent": "updated!!!111",
"suggestions": [],
"templateDetails": {
"bot_name": "XXXXXX",
"variables": [],
"category": "text",
"payload": {}
}
}Response
{
"success": true,
"message": "Templateupdatedsuccessfully!!!",
"templateData": {
"name": "text_temp_7",
"type": "text_message",
"botId": "XXXXXX",
"textMessageContent": "updated!!!111"
}
}Error responses
No error response example is provided for this operation.
Create Rich Message Template
Create a Rich Card template that supports multimedia content and interactive suggestions.
This feature is available for both international agents and India - Jio agents.
Endpoint details
| Field | Value |
|---|---|
| Endpoint URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template |
| Method | POST |
| Content-Type | application/json |
| Authentication Required | Yes |
Request body
{
"name": "Varshtest",
"type": "rich_card",
"orientation": "VERTICAL",
"height": "SHORT_HEIGHT",
"standAlone": {
"cardTitle": "Keep calm & BAT on!",
"cardDescription": "Time to go big or go home because it's India VS Australia FINALS!",
"fileName": "gifnew.mp4",
"thumbnailFileName": "Logo.png",
"suggestions": [
{
"suggestionType": "reply",
"displayText": "Answer & Win",
"postback": "answer_win_1"
}
]
},
"templateDetails": {
"bot_name": "XXXXXX",
"variables": [],
"category": "rich_card",
"payload": {}
}
}Response
{
"success": true,
"message": "Templatecreatedsuccessfully!!!",
"templateData": {
"name": "Varshtest",
"type": "rich_card",
"orientation": "VERTICAL",
"height": "SHORT_HEIGHT",
"botId": "XXXXXX",
"standAlone": {
"cardId": "F2AYphVJqwwKGFo6bZmWzA",
"cardTitle": "Keepcalm&BATon!",
"cardDescription": "Timetogobigorgohomebecauseit'sIndiaVSAustraliaFINALS!",
"mediaUrl": "https://directory.virbm.in/rcsbotdirectory/rcs_message/media/IHM3P3IZ5LR02E1YMP4D.mp4",
"thumbnailUrl": "https://directory.virbm.in/rcsbotdirectory/rcs_message/media/7L62ILHHN7W00FUWP2EL.png",
"suggestions": [
{
"suggestionId": "PMizftTAHOeQOPwvpBrIgw",
"suggestionType": "reply",
"displayText": "Answer&Win",
"postback": "answer_win_1"
}
]
}
}
}Error responses
No error response example is provided for this operation.
Update/Edit Rich Message Template
Update an existing Rich Card template. Only templates that are in a pending state can be modified.
Only templates in a pending state can be updated.
Endpoint details
| Field | Value |
|---|---|
| Endpoint URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template |
| Method | PUT |
| Content-Type | application/json |
| Authentication Required | Yes |
Request body
{
"name": "Varshtestingnew",
"type": "rich_card",
"orientation": "VERTICAL",
"height": "SHORT_HEIGHT",
"standAlone": {
"cardTitle": "Test 123 on!-1",
"cardDescription": "Time to go big or go home because it's India VS Australia FINALS!-updated",
"fileName": "gifnew.mp4",
"thumbnailFileName": "Logo.png",
"suggestions": [
{
"suggestionType": "reply",
"displayText": "Answer & Win",
"postback": "answer_win_1"
}
]
},
"templateDetails": {
"bot_name": "Routemobile",
"variables": [],
"category": "rich_card",
"payload": {}
}
}Response
{
"success": true,
"message": "Templateupdatedsuccessfully!!!",
"templateData": {
"name": "XXXXXX",
"type": "rich_card",
"orientation": "VERTICAL",
"height": "SHORT_HEIGHT",
"botId": "XXXXXX",
"standAlone": {
"cardId": "PlMoE8eyYKIt7CVAfOxpeA",
"cardTitle": "Test123on!-1",
"cardDescription": "Timetogobigorgohomebecauseit'sIndiaVSAustraliaFINALS!-updated",
"mediaUrl": "https://directory.virbm.in/rcsbotdirectory/rcs_message/media/V1IDPQEB97HH066XQ16S.mp4",
"thumbnailUrl": "https://directory.virbm.in/rcsbotdirectory/rcs_message/media/VPQJGACNNT6JBOOAC92W.png",
"suggestions": [
{
"suggestionId": "Hb_j85h_e0rL1gJvge8V7Q",
"suggestionType": "reply",
"displayText": "Answer&Win",
"postback": "answer_win_1"
}
]
}
}
}Error response
{
"success": false,
"message": "Template not in pending state, only templates that are in pending state can be updated!!!"
}Create Carousel Template
Create a Carousel Template consisting of multiple rich cards with media, titles, descriptions, and suggested actions.
Endpoint details
| Field | Value |
|---|---|
| Endpoint URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template |
| Method | POST |
| Content-Type | application/json |
| Authentication Required | Yes |
Request body
{
"name": "varsh_carousel_test",
"type": "carousel",
"height": "SHORT_HEIGHT",
"width": "MEDIUM_WIDTH",
"carouselList": [
{
"cardTitle": "Ditch the ordinary!",
"cardDescription": "Fashion-forward sunglasses to amp up your look",
"fileName": "roubot logo.png",
"suggestions": [
{
"suggestionType": "url_action",
"url": "https://brandx.onelink.me/",
"application": "webview",
"web_view_mode": "half",
"displayText": "Buy Now",
"postback": "buy_now"
}
]
},
{
"cardTitle": "Step into the limelight!",
"cardDescription": "Choose from new arrival sunglasses.",
"fileName": "gifnew.mp4",
"thumbnailFileName": "Logo.png",
"suggestions": [
{
"suggestionType": "dialer_action",
"phoneNumber": "{phone}",
"displayText": "Call now",
"postback": "[call_now]"
}
]
}
],
"templateDetails": {
"bot_name": "Routemobile",
"variables": [],
"category": "carousel",
"payload": {}
}
}Response
{
"success": true,
"message": "Templatecreatedsuccessfully!!!",
"templateData": {
"name": "varsh_carousel_test",
"type": "carousel",
"height": "SHORT_HEIGHT",
"width": "MEDIUM_WIDTH",
"botId": "XXXXXX",
"carouselList": [
{
"cardId": "wIlE4VtuHzt_yVrg-8PGIw",
"cardTitle": "Ditchtheordinary!",
"cardDescription": "Fashion-forwardsunglassestoampupyourlook",
"mediaUrl": "https://directory.virbm.in/rcsbotdirectory/rcs_message/media/GEIOB9RO4HDXPYSHQPGB.png",
"suggestions": [
{
"suggestionId": "SbL8bF7fj4eBt_EOZkuv5A",
"suggestionType": "url_action",
"displayText": "BuyNow",
"postback": "buy_now",
"url": "https://brandx.onelink.me/"
}
]
},
{
"cardId": "MzC7t9KvN-Wz0KNYYZblfg",
"cardTitle": "Stepintothelimelight!",
"cardDescription": "Choosefromnewarrivalsunglasses.",
"mediaUrl": "https://directory.virbm.in/rcsbotdirectory/rcs_message/media/BAZYL462FJCWJWL7OC0L.mp4",
"thumbnailUrl": "https://directory.virbm.in/rcsbotdirectory/rcs_message/media/QCAB0Z9HAEHSBFJ8CY39.png",
"suggestions": [
{
"suggestionId": "JcDDivOEuN0fB6gy3A-x0Q",
"suggestionType": "dialer_action",
"displayText": "Callnow",
"postback": "call_now",
"phoneNumber": "{phone}"
}
]
}
]
}
}Error responses
No error response example is provided for this operation.
Update/Edit Carousel Template
Update an existing carousel template. Only templates that are in the pending state are eligible for editing.
Only templates in a pending state can be updated.
Endpoint details
| Field | Value |
|---|---|
| Endpoint URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template |
| Method | PUT |
| Content-Type | application/json |
| Authentication Required | Yes |
Request body
{
"name": "test_carousel_2",
"type": "carousel",
"height": "SHORT_HEIGHT",
"width": "MEDIUM_WIDTH",
"carouselList": [
{
"cardTitle": "updated-card",
"cardDescription": "Fashion-forward sunglasses to amp up your look",
"fileName": "file_example_MP4_480_1_5MG.mp4",
"thumbnailFileName": "file_example_JPG_100kB_2_1.jpg",
"suggestions": [
{
"suggestionType": "url_action",
"url": "https://brandx.onelink.me/",
"application": "webview",
"web_view_mode": "half",
"displayText": "Buy Now",
"postback": "buy_now"
}
]
},
{
"cardTitle": "card2",
"cardDescription": "Choose from new arrivalsunglasses.",
"fileName": "file_example_MP4_480_1_5MG (copy).mp4",
"thumbnailFileName": "file_example_JPG_100kB_2_1 (copy).jpg",
"suggestions": [
{
"suggestionType": "dialer_action",
"phoneNumber": "{phone}",
"displayText": "Call now",
"postback": "call_now"
}
]
}
],
"templateDetails": {
"bot_name": "Routemobile",
"variables": [],
"category": "carousel",
"payload": {}
}
}Response
{
"success": false,
"message": "Template not in pending state, only templates that are in pending state can be updated!!!"
}Error responses
No separate error response example is provided for this operation.
Delete Template
Delete templates that were created a long time ago and have not been used recently.
URL request
No URL request example is provided for this operation.
Response
{
"success": true,
"message": "Template Deleted successfully !!"
}Error response
{
"success": false,
"message": "Template not found with name Varshtestignew Please ensure given template name Base 64 URL encoded."
}GET Template API
Retrieve all templates created for a specific agent or bot.
Endpoint details
| Field | Value |
|---|---|
| Endpoint URL | https://apis.rmlconnect.net/rcs-template-apis/api/v1/template |
| Method | GET |
| Content-Type | application/json |
| Authentication Required | Yes |
Response
No response body example is provided for this operation.
Response parameters
| Field | Description |
|---|---|
| username | Global Username will be unique for each brand. |
| bot_name | Agent name specific to the category that has been created. |
| category | Template type category. Supported values include Text, Rich_card, and Carousel. |
| name | Template Name should be unique without any special characters in it. Only space is allowed. |
| Rich_Card | Card Orientation: Horizontal or Vertical. If you select Horizontal, then select card alignment: LEFT / RIGHT. If you select Vertical, then select media height: SHORT/MEDIUM. |
| Rich_Carousel | Carousel means multiple rich cards with a minimum of 2 cards and a maximum of 10 cards. Select Card Width and Media height. Card Width: SMALL/MEDIUM. Media Height: SHORT/MEDIUM. All 4 combinations are possible: SMALL & SHORT, SMALL & MEDIUM, MEDIUM & SHORT, MEDIUM & MEDIUM. |
| suggestions | Suggested actions/buttons. |
| suggestionType | Type of button, such as Reply, URL, or Dialer. |
| displayText | Display text visible on the handset when the message is triggered. |
| Postback | Information sent back to the client's webhook if it has clicks/actions. |
| suggestionId | Suggestion Id created at VI end to differentiate each button. |
| botId | BotId is a unique id created at Vodafone’s end for each Bot/Agent with respect to Bot category. |
| cardId | cardId created at Vodafone’s end to differentiate between each card in the carousel and standalone template. |
| status | Status will be Rejected, Pending, or Approved. |
| createdAt | Time and date of template creation. |
| updatedAt | Time and date of template updated status. |
| system_ip | IP address from which the template was created. |
| comments | Reasons appear under comments if the template is rejected. If the template is pending or approved, comments will be null. |
Updated 11 days ago