API to delete template by element name
curl --location --request DELETE '{{api_front_url}}/wa/app/:appId/template/:elementName' \
--header 'apikey: <apikey>'Status codes:
| Status Code | Status | Response | Description |
|---|---|---|---|
| 200 | Success | { "status": "success" } | |
| 400 | Error | { "status":"error", "message":"Invalid App ID" } | appId provided is not valid |
| 400 | Error | { "status":"error", "message":"Delete Operation is not allowed for sandbox apps" } | App is not live |
| 400 | Error | { "status":"error", "message":"Please Check If App Has been approved" } | App is not approved |
| 400 | Error | { "status":"error", "message":"Template Does not exists." } | No template found for the provided element name. |
| 400 | Error | { "status":"error", "message":"Template Cannot be deleted" } | Not a master template |
| 400 | Error | { "status":"error", "message":"Unable to delete the template, please try after sometime and if issue still exists than contact dev support" } | Error occured while deleting template. |
| 403 | Error | { "status":"error", "message":"Not App Owner" } | appId provided is not associated with the provided api key. |
Request Params
| Parameter | Description | Constraints |
|---|---|---|
| apikey | Apikey of the account where the app is to be created | Should be a valid gupshup.io apikey |
Path Params
| Parameter | Description | Constraints |
|---|---|---|
| appId | App id of the app | |
| elemetnName | element name for the template to be deleted |
Response Params
| Parameter | Description | Constraints |
|---|---|---|
| status | API call status(“success/error”) | |
| message | error message describing failure of API |