> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wiseyield.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete template

> Soft-delete a template. Only own templates can be deleted.

```
DELETE https://www.wiseyield.co/api/v1/templates/{id}
```

### Authentication

Requires a key with the `tasks:write` scope.

### Path parameters

<ParamField path="id" type="string" required>Template UUID.</ParamField>

### Response

Returns `204 No Content` on success.

<Warning>
  Recurring task schedules and previously-applied tasks reference the template by UUID via foreign key. Soft-deleting the template doesn't affect those — but new attempts to apply or create recurring schedules against it will return `404 NOT_FOUND`.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE 'https://www.wiseyield.co/api/v1/templates/aaaaaaaa.../...' \
    -H "Authorization: Bearer $WISEYIELD_API_KEY"
  ```
</RequestExample>

## Errors

| Status                    | When                                            |
| ------------------------- | ----------------------------------------------- |
| `400 INVALID_ID`          | `{id}` is not a valid UUID                      |
| `401`                     | Missing, malformed, expired, or revoked API key |
| `403 INSUFFICIENT_SCOPE`  | Key lacks `tasks:write` scope                   |
| `404 NOT_FOUND`           | Template doesn't exist or wasn't created by you |
| `429 RATE_LIMIT_EXCEEDED` | Per-user rate limit reached                     |
| `5xx`                     | Server error                                    |
