# Check accounts health

Checks accounts health.

```http
GET https://api.pozy.ai/v1/accounts/health
```

- Area: Accounts & connections / Accounts
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `profileId` (string)
- `platform` (string): one of facebook, instagram, linkedin, twitter, tiktok, youtube, threads, pinterest, reddit, bluesky, googlebusiness, telegram, snapchat, discord, slack, whatsapp, shopify, wordpress, wix, linkedinads, metaads, pinterestads, tiktokads, xads, googleads, openaiads, redditads, whopads, hubspot, webflow
- `status` (string): one of healthy, warning, error

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/accounts/health" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/accounts/health", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/accounts/health",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `summary`, object
  - `total`, integer
  - `healthy`, integer
  - `warning`, integer
  - `error`, integer
  - `needsReconnect`, integer
- `accounts`, array of object
  - `accountId`, string
  - `platform`, string
  - `username`, string
  - `displayName`, string
  - `profileId`, string
  - `status`, string: One of `healthy`, `warning`, `error`
  - `canPost`, boolean
  - `canFetchAnalytics`, boolean
  - `tokenValid`, boolean
  - `tokenExpiresAt`, string (date-time)
  - `needsReconnect`, boolean
  - `issues`, array of string
  - `ownerUserId`, string
  - `disconnectReason`, string: Can be null
  - `disconnectionType`, string: One of `intentional`, `unintentional`. Can be null
  - `unhealthySince`, string (date-time): Can be null
  - `analyticsSync`, object
    - `status`, string: One of `ok`, `failing`, `stalled`, `never_synced`
    - `lastSyncedAt`, string (date-time): Can be null
  - `messagingRestriction`, object: Can be null
    - `code`, integer: Can be null
    - `subcode`, integer: Can be null
    - `message`, string: Can be null
    - `firstSeenAt`, string (date-time)
    - `lastSeenAt`, string (date-time)
    - `pausedUntil`, string (date-time): Can be null

```json
{
  "summary": {
    "total": 42,
    "healthy": 1,
    "warning": 1,
    "error": 1,
    "needsReconnect": 1
  },
  "accounts": [
    {
      "accountId": "696e0b682d0a31188e7a2ba9",
      "platform": "instagram",
      "username": "acme",
      "displayName": "Acme",
      "profileId": "6a0b6573846efc28aaa9a3ff",
      "status": "healthy",
      "canPost": true,
      "canFetchAnalytics": true,
      "tokenValid": true,
      "tokenExpiresAt": "2026-10-02T09:00:00.000Z",
      "needsReconnect": true,
      "issues": [
        "string"
      ],
      "ownerUserId": "690c200e58fe030fdf30059f",
      "disconnectReason": "string",
      "disconnectionType": "intentional",
      "unhealthySince": "2026-10-02T09:00:00.000Z",
      "analyticsSync": {
        "status": "ok",
        "lastSyncedAt": "2026-10-02T09:00:00.000Z"
      },
      "messagingRestriction": {
        "code": 1,
        "subcode": 1,
        "message": "Hello from Pozy",
        "firstSeenAt": "2026-10-02T09:00:00.000Z",
        "lastSeenAt": "2026-10-02T09:00:00.000Z",
        "pausedUntil": "2026-10-02T09:00:00.000Z"
      }
    }
  ]
}
```
