# Get Application (GET)

Retrieve details of a specific application by its unique identifier.

## Endpoint

```
GET 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 GET "https://api.pocketalert.app/v1/applications/sozb3yswlwoqdd1l1msi1nnh" \
  -H "Token: your-api-key"
```

**JavaScript**

```javascript
const tid = 'sozb3yswlwoqdd1l1msi1nnh';

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

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

**Python**

```python
import requests

tid = 'sozb3yswlwoqdd1l1msi1nnh'

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

print(response.json())
```

**PHP**

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

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

## Response

### Success Response

> **Tip: 200 OK**
>
> Returns the application object

| 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:29:02"
}
```

### Error Responses

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