# Delete Form (DELETE)

Permanently delete a form. Its public link stops working at once. Messages the form already produced are kept.

## Endpoint

```
DELETE https://api.pocketalert.app/v1/forms/{tid}
```

## Authentication

> **Info: Required**
>
> Include one of these headers in your request:
> - `Token: <your-api-key>` — Get it from [API Keys](https://pocketalert.app/account/apikeys)
> - `Authorization: Bearer <jwt-token>` — From [Login](https://info.pocketalert.app/api/user/login.md)

## Request

### Path Parameters

| Parameter | Type | Required | Description |
|-----------|------|:--------:|-------------|
| `tid` | string | ✅ | Form identifier |

### Example Request

**cURL**

```bash
curl -X DELETE "https://api.pocketalert.app/v1/forms/vml19aihrga216gt8apc5e3m9" \
  -H "Token: your-api-key"
```

**JavaScript**

```javascript
await fetch('https://api.pocketalert.app/v1/forms/vml19aihrga216gt8apc5e3m9', {
  method: 'DELETE',
  headers: { 'Token': 'your-api-key' }
});
```

**Python**

```python
import requests

requests.delete(
    'https://api.pocketalert.app/v1/forms/vml19aihrga216gt8apc5e3m9',
    headers={'Token': 'your-api-key'}
)
```

## Response

### Success Response

> **Tip: 200 OK**
>
> ```json
> { "data": "success" }
> ```

> **Warning: Not reversible**
>
> A deleted form cannot be restored, and its link cannot be reissued. To stop responses without losing the form, set `is_active` to `false` with [Update Form](https://info.pocketalert.app/api/forms/update.md).

### Error Responses

| Status | Description |
|:------:|-------------|
| `401` | Unauthorized — Invalid or missing token |
| `404` | Form not found, or it belongs to another account |
| `500` | Failed to delete form |
