Send Template Message with Static Content
POST Method
The Send Template Message with Static Content uses a template with no variable parts; the message text remains the same for every recipient.
Note:
This feature is applicable only to customer onboarded in the India region.
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.
- You must have an approved AgentID or a specific number to be used as AgentID.
- Templates must be approved in Kaleyra platform and in RCS ecosystem.
API request to Send Static Template Message
To send Static template message, use the https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/messages endpoint with the following request method:
The following is the request format to send approved templates without variables:
curl --location --request POST 'https://<api_domain>/v1/<sid>/rcs/messages' \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
"from": "<from>",
"to": ["<to>"],
"templateId": "<template_id>"
}'The following is the sample request format to send approved templates without variables:
curl --location --request POST 'https://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX/rcs/messages' \
--header 'Content-Type: application/json' \
--header 'api-key: XXXXX3b8497f58a94e84b671aca43XXXX' \
--data '{
"from": "rcs-vi-IN-Trans",
"to": ["91XXXXXXXXXX","91XXXXXXXXXX"],
"templateId": "template-static-1234"
}'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 |
The following is the list of attributes to be used in the payload to send Static message:
| Parameter | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
from | String | The service code unique to the RCS agent, specified when the RCS agent is created or onboarded. You can contact the RCS Provisioning Team for more details on unique service code. | rcs-vi-IN-Trans | Yes |
to | Array of String | List of recipients’ device addresses (up to 100 allowed), a phone number in E.164 format prefixed with the country code without a plus sign used to contact the user. | ["91XXXXXXXXXX", "91XXXXXXXXXX"] | Yes |
temptlateId | String | Defines the template ID which is automatically created after sending template creation API. | template-static-1234 | Yes |
Sample Success Response
The following is the sample success response:
{
"code": "1200",
"message": "Message Sent Successfully to provider",
"data": {
"to": ["91XXXXXXXXXX","91XXXXXXXXXX"],
"messageId": "0c213560-47d1-46c4-a71d-d6XXXXXXXXXX"
},
"error": {}
}Sample Failure Response
The following is the sample failure responses:
{
"type":"ERROR",
"eventId":"5d951fc9-9d96-4971-96f0-aaXXXXXXXX3e",
"from":"91XXXXXXXXXX",
"to":"rcs-vi-IN-Trans",
"sentAt":"2026-02-19T12:36:28.421Z",
"messageId":"cb774c44-2205-4bf0-a754-b9a1XXXXXXX9",
"error":
{
"code":"CARRIER_ERROR",
"reason":"400-B-- Template not approved",
}
} {
"type":"ERROR",
"eventId":"bb81b327-e08e-4e39-8b0d-6XXXXXXXXXX0",
"from":"91XXXXXXXXXX",
"to":"rcs-vi-IN-Trans",
"sentAt":"2026-02-20T10:18:02.281Z",
"messageId":"ccec5381-b6bd-4faf-8bfc-09XXXXXXXXXX",
"error":
{
"code":"CARRIER_ERROR",
"reason":"400-C-- Template limit exceeded",
}
}Updated about 6 hours ago
