# Get All Applications (GET)

Retrieve a list of all applications in your account.

## Endpoint

```
GET https://api.pocketalert.app/v1/applications
```

## 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

### Headers

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

<small>* One of `Token` or `Authorization` is required</small>

### Example Request

**cURL**

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

**JavaScript**

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

const applications = await response.json();
console.log(applications);
```

**Python**

```python
import requests

response = requests.get(
    'https://api.pocketalert.app/v1/applications',
    headers={'Token': 'your-api-key'}
)

print(response.json())
```

**PHP**

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

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

## Response

### Success Response

> **Tip: 200 OK**
>
> Returns an array of application objects

| Field | Type | Description |
|-------|------|-------------|
| `tid` | string | Unique application identifier |
| `name` | string | Application name |
| `is_active` | boolean | Whether the application is active |
| `created_at` | string | Creation timestamp |

```json
[
  {
    "tid": "sozb3yswlwoqdd1l1msi1nnh",
    "name": "Production Monitoring",
    "is_active": true,
    "created_at": "18.09.2023 02:31:32"
  },
  {
    "tid": "zah97tnq4re45ych91byjzwa",
    "name": "Development Alerts",
    "is_active": true,
    "created_at": "18.09.2023 02:31:14"
  }
]
```

### Error Responses

| Status | Description |
|:------:|-------------|
| `401` | Unauthorized — Invalid or missing token |
| `429` | Rate Limited — Too many requests |
