# Delete a template

`DELETE /v1/templates/{id}`

Deletes the template from WhatsApp, then from Soosh. Only this language version is deleted.

Needs `templates:write`.

## Path parameters

- `id` (string, uuid): The template's ID.

## Drafts

A draft that was never submitted is only removed from Soosh.

## Templates in use

To delete a template that a broadcast uses, cancel the broadcast or wait for it to finish.

## Example

```sh
curl -X DELETE https://app.soosh.io/v1/templates/2f9a6c1d-5e3b-4a78-8c04-b1d7e5f3a920 \
  -H "Authorization: Bearer $SOOSH_API_KEY"
```

## Returns

204. No content.

## Errors

Besides the ones every request can get (https://docs.soosh.io/reference/api/errors/):

- 404 `not_found`: There is no template with this ID in your workspace.
- 409 `invalid_state`: A preparing, scheduled, queued, processing or paused broadcast uses the template, or it is already being deleted.
- 422 `invalid_field`: WhatsApp refused to delete the template. The message is WhatsApp's, and the template stays.