delete https://yourdomain.webexcampaign.io/campaignapi/resources/v3/message-templates/?channel=email
This API is used to delete a message template that was created using the API. The email template id should be provided in the request.
Know your endpoint
Based on the domain you use to log in to Webex Campaign, the endpoint domain for your API varies. For more information, refer to the Know Your API Endpoints section.
Headers
The following table describes the request headers:
Request Header | Description |
---|---|
content-type | application/json |
authorization | Access token or API Secret Key in Bearer format Example: Bearer $(key) |
Body Parameters
The following table describes the elements in the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
channel | String | Mandatory | Specifies the channel. The options are: |
Request Example
https://<yourdomain>/campaignapi/resources/v3/message-templates/16654964070008?channel=email
Response Example
{
"id": "16715338090115",
"name": "sample_emailtemplate",
"message": "Email Template deleted successfully."
}
Response Parameters
This API will return the following response parameters:
Parameter | Description |
---|---|
id | Returns the message template id |
name | Returns the name of the email template that is updated. |
message | Returns the confirmation message. |
Failure Response Codes
The API will return the code within the response as per the following table in case of failure scenarios.
HTTP Status Code | Code within API Response | Description |
---|---|---|
400 | 400 | I/O error on post request. Cannot retry due to server authentication, in streaming mode. |
400 | 400 | The requested asset is not present. |
401 | 430 | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
401 | 498 | Invalid token or Access token expired |
404 | 404 | Not found |
405 | 405 | Method not supported |
500 | 500 | Internal server error |
500 | 500 | Required String parameter 'channel' is not present" |
500 | 1002 | Mandatory field missing |