# Check account health

Checks account health.

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

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

## Path parameters

- `accountId` (string, required)

## Example request

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

```ts
const res = await fetch("https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/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/696e0b682d0a31188e7a2ba9/health",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `accountId`, string
- `platform`, string
- `integrationLane`, string: One of `business`, `developer`
- `sendCap`, object
  - `limit`, integer
  - `used`, integer
  - `resetsAt`, string (date-time)
- `push`, string: One of `active`, `pending`, `failed`, `not_applicable`
- `username`, string
- `displayName`, string
- `status`, string: One of `healthy`, `warning`, `error`
- `tokenStatus`, object
  - `valid`, boolean
  - `expiresAt`, string (date-time)
  - `expiresIn`, string
  - `needsRefresh`, boolean
- `permissions`, object
  - `posting`, array of object
    - `scope`, string
    - `granted`, boolean
    - `required`, boolean
  - `analytics`, array of object
    - `scope`, string
    - `granted`, boolean
    - `required`, boolean
  - `optional`, array of object
    - `scope`, string
    - `granted`, boolean
    - `required`, boolean
  - `canPost`, boolean
  - `canFetchAnalytics`, boolean
  - `missingRequired`, array of string
- `issues`, array of string
- `recommendations`, 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
- `platformConnection`, object
  - `status`, string: One of `connected`, `disconnected`, `unknown`
  - `checkedAt`, string (date-time)
  - `phoneStatus`, string: Can be null
  - `metaError`, object: Can be null
    - `code`, integer
    - `subcode`, integer
    - `message`, string
  - `inboundWebhookSubscribed`, boolean: Can be null

```json
{
  "accountId": "696e0b682d0a31188e7a2ba9",
  "platform": "instagram",
  "integrationLane": "business",
  "sendCap": {
    "limit": 1,
    "used": 1,
    "resetsAt": "2026-10-02T09:00:00.000Z"
  },
  "push": "active",
  "username": "acme",
  "displayName": "Acme",
  "status": "healthy",
  "tokenStatus": {
    "valid": true,
    "expiresAt": "2026-10-02T09:00:00.000Z",
    "expiresIn": "string",
    "needsRefresh": true
  },
  "permissions": {
    "posting": [
      {
        "scope": "string",
        "granted": true,
        "required": true
      }
    ],
    "analytics": [
      {
        "scope": "string",
        "granted": true,
        "required": true
      }
    ],
    "optional": [
      {
        "scope": "string",
        "granted": true,
        "required": true
      }
    ],
    "canPost": true,
    "canFetchAnalytics": true,
    "missingRequired": [
      "string"
    ]
  },
  "issues": [
    "string"
  ],
  "recommendations": [
    "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"
  },
  "platformConnection": {
    "status": "connected",
    "checkedAt": "2026-10-02T09:00:00.000Z",
    "phoneStatus": "+14155550123",
    "metaError": {
      "code": 1,
      "subcode": 1,
      "message": "Hello from Pozy"
    },
    "inboundWebhookSubscribed": true
  }
}
```
