Skip to main content

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

ParameterDescription
template_uuidUUID of the template to delete. Obtain this from Get WABA Templates (the uuid field).

Invocation

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'

Response

{
"success": true,
"message": "Template deleted successfully"
}
FieldDescription
successtrue when the template was deleted
messageHuman-readable confirmation message
caution

Deleting a template is permanent and cannot be undone. If your template has multiple language variants, all variants are deleted.

Deletion is not instant on WhatsApp's side: the template enters PENDING_DELETION and is retained for about 30 days before being permanently removed. The name of an approved template cannot be reused for a new template during those 30 days.

Rate limit

Deletions are capped at 40 per hour per WABA number and 100 per hour per 2Chat account; requests over either cap return 429. Each deletion also spends WhatsApp's own management-API allowance for your account, so batch cleanups should be spread out rather than fired in a burst.

Templates used by a running campaign

A template can't be deleted while a campaign that still has messages to send uses it. The request returns 409 with the error code WABA_TEMPLATE_IN_USE and names the campaigns holding it:

{
"error": true,
"error_message": "This template is being used by 1 campaign(s) that still have messages to send: Spring promo (CPNxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Stop or finish them before deleting it."
}

Stop or finish those campaigns first. This covers campaigns that are running, scheduled, paused or waiting — not ones already finished or stopped. The guard exists because WhatsApp rejects every message of a deleted template, so a campaign that loses its template mid-flight can't be resumed and its remaining messages are lost.

If the template is deleted on WhatsApp's side instead (from WhatsApp Manager, or by WhatsApp itself), the campaigns using it are marked as failed, since they can no longer send.

Every deletion also fires the whatsapp.waba.template.deleted webhook — including deletions made from the 2Chat web app or directly in WhatsApp Manager.