RCS Get Template History
GET Method
The Get Template History API allows you to fetch the latest status change history for a specified template.
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.
- Make sure an existing RCS template is already created, as this API provides response only related to existing templates.
API Domain and Value
| api_domain | Value |
|---|---|
| IN pod | https://rcs-api.in.kaleyra.io |
| NA pod | https://rcs-api.na.kaleyra.io |
API Request to Get Template History
To get template history, use the https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/template_history/{template_id} endpoint with the following request method:
The following is the request format to get template history:
curl --location --request GET 'https://<api_domain>/v1/XXXXX6913850XXXX/rcs/template_history/{template_id}' \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \' The following is the sample request format to get template history:
curl --location --request GET 'https://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX/rcs/template_history/3a7370e5-ebcd-4fc3-95cc-6dXXXXXXXX8e' \
--header 'Content-Type: application/JSON' \
--header 'api-key: XXXXX3b8497f58a94e84b671aca43XXXX' \URL Parameters and Headers
The following is the list of parameters and headers to send the outgoing message request:
| Parameter/Headers | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
sid | String | Account SID (Security Identifier). | XXXXX6913850XXXX | Yes |
Content-Type | String | Indicates the format of the content the API will be processing. | The only allowed value is application/JSON | Yes |
api-key | String | API key generated from kaleyra.io account. | XXXXX3b8497f58a94e84b671aca43XXXX | Yes |
template_id | String | Template ID for which status change history is requested. | 3a7370e5-ebcd-4fc3-95cc-6dXXXXXXXX8e | Yes |
Sample Success Response
{
"code": "RCS1102",
"message": "RCS Template details fetched successfully",
"data": [
{
"template_id": "3a7370e5-ebcd-4fc3-95cc-6dXXXXXXXX8e",
"status": "CREATED",
"created_date": "2026-03-26T06:24:38Z",
"created_by": "b5ba2948-1c35-4d56-b9d6-4XXXXXXXX770"
}
],
"error": {}
}The following table lists the RCS template status codes with their meanings:
| Code | Description |
|---|---|
| RCS1102 | Success |
| RCS1104 | Client error (validation failure, bad request). |
| RCS1105 | Server error. |
The following table lists common RCS API error responses and their meanings.
| HTTP Status | Code | Message | Error Code | Error Message |
|---|---|---|---|---|
| 400 | RCS601 | RCS Channel is not enabled for this User | RCS_CHANNEL_DISABLED | RCS Channel is not enabled for this User. |
| 4xx | RCS1104 | Unable to fetch RCS Template history | PROV_ERROR | Upstream error body. |
| 500 | RCS502 | Internal Gateway Error | RCS_CHANNEL_INTERNAL_ERROR | Internal Gateway Error. |
The following table lists common error codes, message, and the conditions that trigger them.
| Error Code | Message | Trigger |
|---|---|---|
| MISSING_REQUIRED_FIELDS | Required fields are missing. | One or more required fields are missing or contain empty values. |
| INVALID_FIELD_VALUES | Template Type and Value mismatch Error. | Template type / payload mismatch or invalid value. |
| MAX_CHAR_LIMIT_EXCEEDED | Maximum Allowed char limit exceeded. | Field exceeds the defined maximum character limit. |
| FIELD_VALUE_ERROR | Invalid field values are passed. | Field values are not within the allowed values list. |
| RESTRICTED_FIELDS_MODIFY_ATTEMPT | Cannot modify restricted fields during update. | Attempted to change template_id or template_number. |
| INVALID_JSON_PAYLOAD | Invalid JSON format passed. | Malformed JSON in request body. |
| RCS_CHANNEL_DISABLED | RCS Channel is not enabled for this user. | RCS channel is not enabled or configured for the user account. |
The following is the list of sample failure responses:
| HTTP Status | Code | Message | Error Code | Error Message |
|---|---|---|---|---|
| 405 | RCS405 | Method not allowed. | METHOD_NOT_ALLOWED | Method not allowed. |
| 400 | RCS601 | RCS Channel is not enabled for this User. | RCS_CHANNEL_DISABLED | RCS Channel is not enabled for this User. |
| 400 | RCS701 | Invalid JSON format passed. | INVALID_JSON_PAYLOAD | Invalid JSON format passed. |
| 400 | RCS1104 | Required fields are missing. | MISSING_REQUIRED_FIELDS | Missing required fields: agent_number, template_type, or template_name. |
| 400 | RCS1104 | Template Type and Value mismatch Error. | INVALID_FIELD_VALUES | text is required when template_type is 1. |
| 400 | RCS1104 | Template Type and Value mismatch Error. | INVALID_FIELD_VALUES | Invalid template_type: 99, Allowed values are: 1, 3, 4, or 5. |
| 400 | RCS1104 | Maximum Allowed char limit exceeded. | MAX_CHAR_LIMIT_EXCEEDED | Field-specific details. |
| 400 | RCS1104 | Invalid field values are passed. | FIELD_VALUE_ERROR | Invalid template_type: 99, Allowed values are: 1, 3, 4, or 5. |
| 4xx | RCS1104 | RCS Template creation Failed. | PROV_ERROR | Upstream error body. |
| 500 | RCS502 | Internal Gateway Error. | RCS_CHANNEL_INTERNAL_ERROR | Internal Gateway Error. |
Updated about 4 hours ago
