RCS Update Template
PUT Method
The Update Template API allows you to modify an existing RCS template that is not active.
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 updates only existing templates.
- Ensure you have the required permissions/role to modify templates in your account.
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 Update a Template
To update a template, use the https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/template/{template_id} endpoint with the following request method:
The following is the request format to update a template:
curl --location --request PUT 'https://<api_domain>/v1/<sid>/rcs/template/{template_id}' \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--data-raw '{
"template_id": "<template_id>",
"agent_number": "<agent_number>",
"template_type": "<template_type>",
"template_name": "<template_name>",
"text": "<text>",
"status": "<status>",
"template_number": "<template_number>"
}' The following is the sample request format to update a template:
curl --location --request PUT 'https://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX/rcs/template/3a7370e5-ebcd-4fc3-95cc-6dXXXXXXXX8e' \
--header 'Content-Type: application/JSON' \
--header 'api-key: XXXXX3b8497f58a94e84b671aca43XXXX' \
--data-raw '{
"template_id": "3a7370e5-ebcd-4fc3-95cc-6dXXXXXXXX8e",
"agent_number": "116XX2",
"template_type": "1",
"template_name": "SHORT_TEXT",
"text": "This is a text updated template message",
"status": "CREATED",
"template_number": "MN6XXXXXXXXX"
}' 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 to update. | 3a7370e5-ebcd-4fc3-95cc-6dXXXXXXXX8e | Yes |
The following is the list of attributes to be used in the payload to update a template:
Parameter/Headers | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
| String | Unique template ID (cannot be modified). | 3a7370e5-ebcd-4fc3-95cc-6d8XXXXXXXXe | Yes |
| String | RCS agent number. | 116XX2 | Yes |
| String | Type of template. The allowed values are 1, 3, 4, and 5. For more information on Template type, see the Template Type table. | 1 | Yes |
| String | Unique template name. A maximum of 20 characters including alphanumeric and underscore is supported. | SHORT_TEXT | Yes |
| String | Text message you want to send to the end users. A maximum of 2000 characters is supported. | This is a text updated template message | Conditional, when |
| String | Display the status of the template. You can view the following statuses:
For more information on template statuses, see the Template Status table. | CREATED | Yes |
| String | Template reference number. | MN6XXXXXXXXX | Yes |
Sample Success Response
The following is the sample success response
{
"code": "RCS1102",
"message": "RCS Template updated successfully",
"data": {
"template_id": "3a7370e5-ebcd-4fc3-95cc-6dXXXXXXXX8e",
"created_date": "2026-04-29T10:30:45Z",
"agent_number": "11XXX6",
"template_type": "1",
"template_name": "SHORT_TEXT",
"text": "This is an autogenerated message from TATA Communication.",
"status": "CREATED",
"template_number": "MN6XXXXXXXXX"
},
"error": {}
}Sample Failure Response
The following is the sample failure response:
{
"code": "RCS1104",
"message": "Cannot modify restricted fields during update.",
"data": [],
"error": {
"error_code": "RESTRICTED_FIELDS_MODIFY_ATTEMPT",
"error_message": "restricted fields cannot be modified: template_id"
}
}The following is the list of error 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. |
| 500 | RCS1104 | Unable to update template due to internal API error | PROV_ERROR | Error details. |
| 400 | RCS1104 | Cannot modify restricted fields during update | RESTRICTED_FIELDS_MODIFY_ATTEMPT | Restricted fields cannot be modified: template_id. |
| 400 | RCS1104 | Cannot modify restricted fields during update | RESTRICTED_FIELDS_MODIFY_ATTEMPT | Restricted fields cannot be modified: template_number. |
| 400 | RCS1104 | Cannot modify restricted fields during update | RESTRICTED_FIELDS_MODIFY_ATTEMPT | Restricted fields cannot be modified: template_id, ortemplate_number. |
| 400 | RCS1104 | Template Type and Value mismatch Error | INVALID_FIELD_VALUES | The rich_card field is required when template_type` is 4. |
| 400 | RCS1104 | Required fields are missing | MISSING_REQUIRED_FIELDS | Missing required fields: agent_number, template_type. |
| 400 | RCS1104 | Maximum allowed character 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 | Failed to update RCS Template | PROV_ERROR | Upstream error body. |
| 500 | RCS502 | Internal Gateway Error | RCS_CHANNEL_INTERNAL_ERROR | Internal Gateway Error. |
Updated about 6 hours ago
