RCS Get Template

GET Method

The Get Template API request fetches a template's details by specifying the 'template ID'.

Prerequisites

  • After you sign up, your account will be on the trial version. You must complete the KYC to access all the features in kaleyra.io.
  • Before you get started, Create an API Key. To view the API Key and the SID, see View API Key and SID.
  • To send any RCS messages, you must configure the RCS channel in the Kaleyra platform. To configure the RCS channel in your account, please contact your local Kaleyra representative.

Base URL

https://rcs-api.<pod>.kaleyra.io/v1/<sid>

API Domain and Value

api_domainValue
IN podhttps://rcs-api.in.kaleyra.io
NA podhttps://rcs-api.na.kaleyra.io

API Request to get Template Details by Template Number

To get the template details by template number, use the https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/template/{template_id} endpoint with the following request method:

Request Format

The following is the request format to get the RCS template details using template ID:

curl --location GET 'https://<api_domain>/v1/<sid>/rcs/template/{template_id}'\
--header 'Content-Type: <content_type>' \
--header 'api-key: <api-key>'

Sample Request Format

The following is the sample request format to get the RCS template details using template ID:

curl --location GET 'https://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX/rcs/template/19XXXX91-2XXa-4XX9-aXX9-b4XXXXXXXXd6'\
--header 'api-key: XXXXX3b8497f58a94e84b671aca43XXXX' \
--header 'Content-Type: application/json'

URL Parameters and Headers

The following is the list of parameters and headers to send the outgoing message request:

Parameter/HeadersData TypeDescriptionExampleMandatory?
sidStringAccount SID (Security Identifier).XXXXX6913850XXXXYes
Content-TypeStringIndicates the format of the content the API will be processing.The only allowed value is application/JSONYes
api-keyStringAPI key generated from kaleyra.io account.XXXXX3b8497f58a94e84b671aca43XXXXYes
template_idStringID of the template for which details will be retrieved.19XXXX91-2XXa-4XX9-aXX9-b4XXXXXXXXd6Yes

Sample Success Response

The following is a sample success response:

{
    "code": "RCS1102",
    "message": "RCS Template details fetched successfully",
    "data": {
        "template_id": "19XXXX91-2XXa-4XX9-aXX9-b4XXXXXXXXd6",
        "regions": [],
        "created_date": 1774458419976,
        "agent_number": "116XX2",
        "template_type": "4",
        "template_name": "doc_test_demo",
        "rich_card_standalone": {
            "card_orientation": "VERTICAL",
            "thumbnail_image_alignment": "LEFT",
            "content": {
                "title": "Card Title",
                "description": "Card description text",
                "media": {
                    "height": "MEDIUM",
                    "file": {
                        "file_url": "https://example.com/image.jpg",
                        "thumbnail_url": "https://example.com/thumb.jpg",
                        "content_description": "Electric Bill"
                    }
                },
                "suggestions": []
            }
        },
        "status": "CREATED",
        "template_number": "MNXXXXXXXXN8"
    },
    "error": {}
}

The following is the list of parameters shown in the success response:

ParameterData TypeDescriptionExample
codeStringStatus code for the response.RCS1102
messageStringMessage for the response.RCS Template details fetched successfully
dataObjectThe payload data for response for get template details.See the specific table for details.

The following table describes the different parameters used for the data JSON object:

Parameter

Data Type

Description

Example

template_id

String

Autogenerated template identification number.

19XXXX91-2XXa-4XX9-aXX9-b4XXXXXXXXd6

regions

String

Region for which the template has been created.

IN

created_date

String

Date when the template was created.

1774458419976

agent_number

String

The ID generated by google at the time of create agent request.

116XX2

template_type

String

Type of template. The allowed values are 1, 3, 4, or 5. For more information on Template type, see the Template Type table.

4

template_name

String

Unique template name. A maximum of 20 characters including alphanumeric and underscore is supported. Space is not allowed.

doc_test_demo

rich_card_standalone

Object

Based on the template type, enter the details for template.

See the specific table for details.

status

String

Display the status of the template. You can view the following statuses:

  • DRAFT (Only for Vi Template)
  • CREATED
  • SUBMITTEDFORAPPROVAL (Only for Vi Template)
  • ACTIVE

CREATED

template_number

String

Unique identification number for the template.

MNXXXXXXXXN8

The following table describes the different parameters used for the rich_card_standalone JSON object:

ParameterData TypeDescriptionExample
card_orientationStringThe card orientation in template message. It can be either VERTICAL or HORIZONTAL.VERTICAL
thumbnail_image_alignmentStringThe card alignment in the template. It can be either LEFT or RIGHT.LEFT
contentObjectThe content below the card in the template.See the specific table for details.

The following table describes the different parameters used for the content JSON object:

ParameterData TypeDescriptionExample
titleStringTitle of the card.Card Title
descriptionStringDescription of the card relevant to the title.Card description text
mediaObjectMedia attached to the card.See the specific table for details.
suggestionsStringSuggestion chip list.

The following table describes the different parameters used for the media JSON object:

ParameterData TypeDescriptionExample
heightStringThe height of media file in the template. It can be Short, Medium, or Tall.MEDIUM
fileObjectFile that is attached to the template.See the specific table for details.

The following table describes the different parameters used for the file JSON object:

ParameterData TypeDescriptionExample
file_urlStringThe URL of the file to be sent.https://example.com/image.jpg
thumbnail_urlStringURL of the thumbnail for the file.https://example.com/thumb.jpg
content_descriptionStringDescription for URL file.Electric Bill

Sample Failure Response

The following are sample failure responses:

{
  "code": "RCS601",
  "message": "RCS Channel is not enabled for this User.",
  "data": [],
  "error": {
    "error_code": "RCS_CHANNEL_DISABLED",
    "error_message": "RCS channel not enabled"
  }
}

The following is the list of sample failure responses:

HTTP Status CodeMessageError CodeError Message
400RCS601RCS_CHANNEL_DISABLEDRCS Channel is not enabled for this User.
4xxRCS1104PROV_ERRORServer error in body.
500RCS502RCS_CHANNEL_INTERNAL_ERRORInternal Gateway Error.




© 2026 Kaleyra Inc. All rights reserved.
Trademarks, logos and service marks displayed on this site are registered and unregistered trademarks of Kaleyra Inc.