Use this API to delete a template using the elementName.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
You will need details below to start using this API.
NOTE: This action is irreversible. Once a template has been deleted, it cannot be restored.
- App ID
- Partner App Token
- Element Name
Parameters
| Key | Description | Required | Type | Value | Constraints |
|---|---|---|---|---|---|
| Authorization | Access Token for the application | Required | String | {{PARTNER_APP_TOKEN}} | Should be a valid Partner App Access Token |
| appId | App id of the app | Required | String | {{APP_ID}} | The Id should be a valid app ID of Gupshup |
| elementName | element name for the template to be deleted | Required | String | {{ELEMENT_NAME}} |
Sample Request
curl --location --request DELETE 'https://partner.gupshup.io/partner/app/{{APP_ID}}/template/{{ELEMENT_NAME}}' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}'Sample Response
{
"status": "success"
}Sample Response
| Status Code | Response | Comment |
|---|---|---|
| Success | ||
| 200 | { "status": "success"} | |
| Error | ||
| 400 | { "status":"error","message":"Invalid App ID" | The provided appId is not valid. |
| 400 | { "status":"error","message":"Delete Operation is not allowed for sandbox apps" | App is not live |
| 400 | { "status":"error", | App is not approved |
| 400 | { "status":"error", | No template found for the provided element name. |
| 400 | { "status":"error", | Not a master template |
| 400 | { "status":"error", | Error occured while deleting template. |
| 403 | { "status":"error", | appId provided is not associated with the provided api key. |
| 500 | { "status": "error", | For any Internal Error |