# Состояние приложения

Эндпоинт health предназначен для быстрой проверки работы API, корректности авторизации и текущих прав (abilities) токена.

* Метод: `GET`
* Путь: `https://app.{ваш_домен}/api/v3/private/health`

{% hint style="info" %}
Замените {ваш\_домен} на домен вашей панели/обменника.

Например:

<https://app.iexexchanger.com/api/v3/private/health>
{% endhint %}

***

### Пример запроса (cURL)

```
curl -X GET "https://app.{ваш_домен}/api/v3/private/health" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json; charset=utf-8" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Пример запроса (Laravel HTTP Client)

```php
use Illuminate\Support\Facades\Http;

$apiKey  = 'YOUR_API_KEY';
$baseUrl = 'https://app.{ваш_домен}/api/v3/private';

$client = Http::baseUrl($baseUrl)
    ->withToken($apiKey)   // добавляет заголовок Authorization: Bearer {token}
    ->acceptJson()
    ->asJson();

// Тест состояния API и авторизации
$response = $client->get('health');

if ($response->successful()) {
    $data = $response->json();
    dd('API HEALTH OK', $data);
} else {
    dd('API HEALTH ERROR', $response->status(), $response->body());
}
```

***

### Структура ответа

```json
{
  "type": "health",
  "attributes": {
    "status": "ok",
    "authenticated": true,
    "user": {
      "id": 1,
      "name": "Demo User",
      "email": "demo@example.com"
    },
    "abilities": [
      "account",
      "partner"
    ]
  },
  "meta": {
    "timestamp": "2025-12-06T15:30:12+00:00",
    "app": "iEXExchanger",
    "version": "10.3.0"
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iexexchanger.com/front-api/private-api/sostoyanie-prilozheniya.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
