Use this API to delete a template using the templateId and elementName.
Note
This action is irreversible. Once a template has been deleted, it cannot be restored.
Request Parameters
Key | Description | Values | Data Types | Required/Optional | Constraints |
---|---|---|---|---|---|
Authorization | Access Token for the application | {PARTNER_APP_TOKEN} | String | Required | Should be a valid Partner App Access Token |
appId | App id of the app | bf9ee64c-3d4d-4ac4-xxxx-732e577007c4 | String | Required. | The Id should be a valid app Id of Gupshup |
elementName | element name for the template to be deleted | {ELEMENT_NAME} | String | Required |
Sample Request
curl --location --request DELETE 'http://partner.gupshup.io/partner/app/{{APP_ID}}/template/{{ELEMENT_NAME}}/{{TEMPLATE_ID}}' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}'
Sample Response
{
"status": "success"
}
Status Codes
Status Code | Response | Comments |
---|---|---|
Success |
||
200 |
|
|
Error |
||
400 |
|
The provided appId is not valid. |
403 |
|
If template Id and template name does not match |
400 |
|
App is not live |
400 |
{ |
App is not approved |
400 |
{ |
No template found for the provided element name. |
400 |
{ |
Not a master template |
400 |
{ |
Error occured while deleting template. |
403 |
{ |
appId provided is not associated with the provided api key. |
500 |
{ |
For any Internal Error |