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

FieldValue
Template create/update URLhttps://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template
Get templates URLhttps://apis.rmlconnect.net/rcs-template-apis/api/v1/template
Content-Typeapplication/json
Authentication RequiredYes

Authentication

Pass a valid access token in the Authorization header.

Request headers

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

Template workflows

Basic Text Message Template

Create or update text message templates.

Rich Message Template

Create or update rich card templates with media and suggestions.

Carousel Template

Create or update carousel templates with multiple rich cards.

Template Status

Check whether a submitted template is approved, rejected, or pending.

Delete Template

Delete unused templates.

Get Template APIs

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

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

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

FieldValue
Endpoint URLhttps://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template
MethodPUT
Content-Typeapplication/json
Authentication RequiredYes

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

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

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

FieldValue
Endpoint URLhttps://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template
MethodPUT
Content-Typeapplication/json
Authentication RequiredYes

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

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

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

FieldValue
Endpoint URLhttps://apis.rmlconnect.net/rcs-template-apis/api/v1/template/template
MethodPUT
Content-Typeapplication/json
Authentication RequiredYes

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.

Get Template Status

Use this operation to check whether a template submitted to an operator is approved, rejected, or still pending.

URL request

No URL request example is provided for this operation.

Response

{
  "success": true,
  "templateStatus": "rejected"
}
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

FieldValue
Endpoint URLhttps://apis.rmlconnect.net/rcs-template-apis/api/v1/template
MethodGET
Content-Typeapplication/json
Authentication RequiredYes

Response

No response body example is provided for this operation.

Response parameters

FieldDescription
usernameGlobal Username will be unique for each brand.
bot_nameAgent name specific to the category that has been created.
categoryTemplate type category. Supported values include Text, Rich_card, and Carousel.
nameTemplate Name should be unique without any special characters in it. Only space is allowed.
Rich_CardCard 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_CarouselCarousel 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.
suggestionsSuggested actions/buttons.
suggestionTypeType of button, such as Reply, URL, or Dialer.
displayTextDisplay text visible on the handset when the message is triggered.
PostbackInformation sent back to the client's webhook if it has clicks/actions.
suggestionIdSuggestion Id created at VI end to differentiate each button.
botIdBotId is a unique id created at Vodafone’s end for each Bot/Agent with respect to Bot category.
cardIdcardId created at Vodafone’s end to differentiate between each card in the carousel and standalone template.
statusStatus will be Rejected, Pending, or Approved.
createdAtTime and date of template creation.
updatedAtTime and date of template updated status.
system_ipIP address from which the template was created.
commentsReasons appear under comments if the template is rejected. If the template is pending or approved, comments will be null.


Did this page help you?