# List ads that need attention

Returns ads that need attention.

```http
GET https://api.pozy.ai/v1/ads/alerts
```

- Area: Ads / Ad Campaigns
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `accountId` (string)
- `profileId` (string)
- `includeDismissed` (boolean)

## Example request

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

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

## Response 200

- `alerts`, array of object
  - `id`, string
  - `kind`, string: One of `ad_rejected`, `delivery_issue`, `payment`, `budget_limited`, `spend_no_results`, `connection_lost`, `sync_failing`
  - `severity`, string: One of `error`, `warning`, `info`
  - `title`, string
  - `message`, string
  - `platform`, string
  - `platformAdAccountId`, string
  - `entity`, object
    - `level`, string: One of `ad_account`, `campaign`, `ad_set`, `ad`
    - `id`, string
    - `name`, string: Can be null
  - `adId`, string
  - `accountId`, string
  - `currency`, string: Can be null
  - `detectedAt`, string (date-time)
  - `fix`, object
    - `label`, string
    - `url`, string (uri-reference)
  - `dismissed`, boolean
- `counts`, object
  - `error`, integer
  - `warning`, integer
  - `info`, integer

```json
{
  "alerts": [
    {
      "id": "6bfebd43ddc270f6d2c56fc5",
      "kind": "ad_rejected",
      "severity": "error",
      "title": "Launch day",
      "message": "Hello from Pozy",
      "platform": "instagram",
      "platformAdAccountId": "673c621a82c88059710de3fd",
      "entity": {
        "level": "ad_account",
        "id": "6bfebd43ddc270f6d2c56fc5",
        "name": "Acme"
      },
      "adId": "6f40fa2fb0a7e728dd1a73b7",
      "accountId": "696e0b682d0a31188e7a2ba9",
      "currency": "USD",
      "detectedAt": "2026-10-02T09:00:00.000Z",
      "fix": {
        "label": "string",
        "url": "https://pozy.ai/media/example-1.jpg"
      },
      "dismissed": true
    }
  ],
  "counts": {
    "error": 1,
    "warning": 1,
    "info": 1
  }
}
```
