# Delete Application (DELETE)

Permanently delete an application and all its associated messages and webhooks. This action cannot be undone.

## Endpoint

```
DELETE https://api.pocketalert.app/v1/applications/{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 | ✅ | Application unique identifier |

### Headers

| Header | Required | Description |
|--------|:--------:|-------------|
| `Token` | ✅ | Your API key |
| `Authorization` | ✅ | `Bearer <jwt-token>` |

### Example Request

**cURL**

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

**JavaScript**

```javascript
const tid = 'iemkz2tlbakj4lgns961ohx0o';
await fetch(`https://api.pocketalert.app/v1/applications/${tid}`, {
  method: 'DELETE',
  headers: { 'Token': 'your-api-key' }
});
```

**Python**

```python
import requests

tid = 'iemkz2tlbakj4lgns961ohx0o'
response = requests.delete(
    f'https://api.pocketalert.app/v1/applications/{tid}',
    headers={'Token': 'your-api-key'}
)
```

**PHP**

```php
$tid = 'iemkz2tlbakj4lgns961ohx0o';
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->delete('https://api.pocketalert.app/v1/applications/'.$tid);

return $response->json();
```

## Response

### Success Response

> **Tip: 200 OK**
>
> Application deleted successfully

```json
{
  "data": "success"
}
```

### Error Responses

| Status | Description |
|:------:|-------------|
| `401` | Unauthorized — Invalid or missing token |
| `404` | Not Found — Application does not exist |
