# Health API

Every health call: what to send, what comes back, and copy-ready examples.

## Tracking health

`GET /health` (scope: health:read)

```bash
curl "https://api.usetotems.com/v1/health" \
  -H "Authorization: Bearer $TOTEMS_KEY"
```

```json
{
  "data": [
    {
      "id": "6f21a525-3b47-4c0e-9a55-1f2e3d4c5b6a",
      "check_key": "script_missing",
      "target": "customer.com/pricing",
      "level": "broken",
      "message": "We can't find the script on this page.",
      "fix": "Add the script line to this page.",
      "first_seen_at": "2026-12-02T22:57:17.879Z",
      "last_seen_at": "2026-12-03T22:57:17.879Z"
    }
  ],
  "request_id": "req_..."
}
```

## Check one of your pages

`POST /health/check` (scope: health:read)

```bash
curl -X POST "https://api.usetotems.com/v1/health/check" \
  -H "Authorization: Bearer $TOTEMS_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/apply"
  }'
```
