## Delete template

`DELETE https://whatsapp.paaltech.org/api/v1/businesses/{external_id}/whatsapp/templates/{name}`

Deletes the template at Meta - one language with `?language=`, otherwise every language of
the name - and removes it from PaalChat's mirror. Messages already sent are not affected.

Ability: `templates.manage`

### Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `external_id` | string | yes | Your own ID for the business (Multi-SKUUL - the tenant ID). Max 191 characters. Pattern `^[A-Za-z0-9._:-]+$` |
| `name` | string | yes | Pattern `^[a-z0-9_]+$` |

### Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `language` | string | no |  |
| `waba_id` | string | no | Needed only when several of the business's accounts have the name. |

### Request

```bash
curl --request DELETE \
  --url 'https://whatsapp.paaltech.org/api/v1/businesses/presec/whatsapp/templates/name' \
  --header "Authorization: Bearer $PAALCHAT_TOKEN" \
  --header 'Accept: application/json'
```

### Responses

- **200** - Deleted.

```json
{"data": {"name": "fee_reminder", "waba_id": "102290129340398", "deleted": 1}}
```

- **401** - unauthenticated - missing, invalid, revoked or expired token

```json
{
  "error": {"code": "unauthenticated", "message": "A valid product token is required."}
}
```

- **403** - missing_ability, product_suspended or product_token_required

```json
{
  "error": {
    "code": "missing_ability",
    "message": "This token does not have the ability this request needs."
  }
}
```

- **404** - not_found (business) or unknown_template.
- **409** - business_suspended - the business is suspended on PaalChat.

```json
{
  "error": {
    "code": "business_suspended",
    "message": "This business is suspended on the platform."
  }
}
```

- **422** - waba_required or template_rejected.
- **429** - rate_limited - over 300 requests/minute for this product

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. Slow down and retry after the Retry-After header."
  }
}
```

- **503** - meta_unavailable.
