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.

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 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:

Request Format

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>"
    }'   

Sample Request Format

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/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_idStringTemplate ID to update.3a7370e5-ebcd-4fc3-95cc-6dXXXXXXXX8eYes

The following is the list of attributes to be used in the payload to update a template:

Parameter/Headers

Data Type

Description

Example

Mandatory?

template_id

String

Unique template ID (cannot be modified).

3a7370e5-ebcd-4fc3-95cc-6d8XXXXXXXXe

Yes

agent_number

String

RCS agent number.

116XX2

Yes

template_type

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

template_name

String

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

SHORT_TEXT

Yes

text

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 template_type is selected as 1.

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

For more information on template statuses, see the Template Status table.

CREATED

Yes

template_number

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 StatusCodeMessageError CodeError Message
405RCS405Method not allowedMETHOD_NOT_ALLOWEDMethod not allowed.
400RCS601RCS Channel is not enabled for this UserRCS_CHANNEL_DISABLEDRCS Channel is not enabled for this User.
400RCS701Invalid JSON format passedINVALID_JSON_PAYLOADInvalid JSON format passed.
500RCS1104Unable to update template due to internal API errorPROV_ERRORError details.
400RCS1104Cannot modify restricted fields during updateRESTRICTED_FIELDS_MODIFY_ATTEMPTRestricted fields cannot be modified: template_id.
400RCS1104Cannot modify restricted fields during updateRESTRICTED_FIELDS_MODIFY_ATTEMPTRestricted fields cannot be modified: template_number.
400RCS1104Cannot modify restricted fields during updateRESTRICTED_FIELDS_MODIFY_ATTEMPTRestricted fields cannot be modified: template_id, ortemplate_number.
400RCS1104Template Type and Value mismatch ErrorINVALID_FIELD_VALUESThe rich_card field is required when template_type` is 4.
400RCS1104Required fields are missingMISSING_REQUIRED_FIELDSMissing required fields: agent_number, template_type.
400RCS1104Maximum allowed character limit exceededMAX_CHAR_LIMIT_EXCEEDEDField-specific details.
400RCS1104Invalid field values are passedFIELD_VALUE_ERRORInvalid template_type: 99, Allowed values are: 1, 3, 4, or 5.
4xxRCS1104Failed to update RCS TemplatePROV_ERRORUpstream error body.
500RCS502Internal Gateway ErrorRCS_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.