Delete WABA Template
Delete a WhatsApp Business API (WABA) message template from your 2Chat account and from the messaging provider (Meta or Gupshup). All language variants of the template are deleted.
info
Requires a WABA channel connected to your 2Chat account. See How to connect WABA to 2Chat.
Path parameters
| Parameter | Description |
|---|---|
template_uuid | UUID of the template to delete. Obtain this from Get WABA Templates (the uuid field). |
Invocation
- cURL
- Python
- JavaScript
curl --request DELETE \
--url 'https://api.p.2chat.io/open/waba/templates/TMPxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
--header 'X-User-API-Key: your_api_key_here'
import requests
template_uuid = "TMPxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
url = f"https://api.p.2chat.io/open/waba/templates/{template_uuid}"
headers = {
"X-User-API-Key": "your_api_key_here"
}
response = requests.delete(url, headers=headers)
print(response.json())
const axios = require('axios');
const templateUuid = 'TMPxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
axios.delete(`https://api.p.2chat.io/open/waba/templates/${templateUuid}`, {
headers: {
'X-User-API-Key': 'your_api_key_here'
}
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
Response
{
"success": true,
"message": "Template deleted successfully"
}
| Field | Description |
|---|---|
success | true when the template was deleted |
message | Human-readable confirmation message |
caution
Deleting a template is permanent and cannot be undone. If your template has multiple language variants, all variants are deleted.