RCS Delete Template
DELETE Method
The Delete Template API allows you to remove a template from the RCS messaging platform based on 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.
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 delete a Template
To delete 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 delete a template:
curl --location --request DELETE 'https://<api_domain>/v1/<sid>/rcs/template/{template_id}'\
--header 'Content-Type: <content_type>' \
--header 'api-key: <api-key>'The following is the sample request format to delete a template:
curl --location --request DELETE 'https://rcs-api.na.kaleyra.io/v1/XXXXX6913850XXXX/rcs/template/19XXXX91-2XXa-4XX9-aXX9-b4XXXXXXXXd6'\
--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 of the template to be deleted. | 19XXXX91-2XXa-4XX9-aXX9-b4XXXXXXXXd6 | Yes |
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 Code | Message | Error Code | Error Message |
|---|---|---|---|
| 400 | RCS601 | RCS_CHANNEL_DISABLED | RCS Channel is not enabled for this User. |
| 4xx | RCS1104 | PROV_ERROR | Server error in body. |
| 500 | RCS502 | RCS_CHANNEL_INTERNAL_ERROR | Internal Gateway Error. |
Updated about 3 hours ago
