delete https://partner.gupshup.io/partner/app//template//
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 | { "status": "success" } | |
Error | ||
400 | { "status":"error", "message":"Invalid App ID" } | The provided appId is not valid. |
403 | { "status":"error", "message":"Template ID and template name does not match" } | If template Id and template name does not match |
400 | { "status":"error", "message":"Delete Operation is not allowed for sandbox apps" } | App is not live |
400 | { "status":"error", "message":"Please Check If App Has been approved" } | App is not approved |
400 | { "status":"error", "message":"Template Does not exists." } | No template found for the provided element name. |
400 | { "status":"error", "message":"Template Cannot be deleted" } | Not a master template |
400 | { "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 | { "status":"error", "message":"Not App Owner" } | appId provided is not associated with the provided api key. |
500 | { "status": "error", "message": "Internal server error. Please try again later and If Issue still persist then contact Gupshup Dev Support" } | For any Internal Error |