> For the complete documentation index, see [llms.txt](https://docs.taqnyat.sa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.taqnyat.sa/api-reference/templates/delete-template.md).

# Delete Template

Use this endpoint to delete an existing WhatsApp message template from your Taqnyat account.

The current API requires both the template **name** and **ID** when submitting the delete request.

### Endpoint

```http
DELETE /templates/
```

Full URL:

```
https://api.taqnyat.sa/wa/v2/templates/
```

### Authentication

Include your Bearer Token in the request header:

```http
Authorization: Bearer <YOUR_TOKEN>
Content-Type: application/json
```

### Request Parameters

| Parameter | Type   | Required | Description                          |
| --------- | ------ | -------- | ------------------------------------ |
| `name`    | String | Yes      | Name of the template to delete.      |
| `id`      | String | Yes      | Unique ID of the template to delete. |

### Example Payload

```json
{
  "name": "order_update",
  "id": "<TEMPLATE_ID>"
}
```

### Example Request

```bash
curl --location --request DELETE \
'https://api.taqnyat.sa/wa/v2/templates/' \
--header 'Authorization: Bearer <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "name": "order_update",
  "id": "<TEMPLATE_ID>"
}'
```

Replace `<TEMPLATE_ID>` with the ID of the template you want to delete.

### Response

The current Taqnyat API reference does not document the exact response body returned by this endpoint.

I recommend adding the real response after testing the endpoint in Postman rather than documenting an assumed structure.

### Notes

* Both `name` and `id` are required.
* Make sure the template ID and name refer to the same template.
* Deleting a template removes it from the account and it should no longer be used in new message requests.
* Use **Get Templates** to retrieve the template information needed before deleting it.
