# POST /api/v1/notifications/mark-all-seen

> Mark all matching notifications seen

- **Tag:** notifications
- **Operation ID:** `mark_all_seen_api_v1_notifications_mark_all_seen_post`

## Description

Server-authoritative: marks EVERY notification the caller can see that matches the optional scope/topic/severity filters as seen — not just the page the client has loaded.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Request body

Schema: `BulkAllRequest`

- `scope` (NotificationScopeEnum) → `NotificationScopeEnum`
- `scope_id` (string) — Required when scope is 'business' or 'firm'
- `topic` (array · NotificationTopicEnum) — Restrict to one or more topics
- `severity` (array · NotificationSeverityEnum) — Restrict to one or more severities
- `live_business_id` (string) — When scope='me', also dismiss live alerts for this business id (dismiss-all only; ignored by mark-all-seen).

## Responses

### 201 — Successful Response

Schema: `BulkOpResponse`

- `updated` (integer · required)

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/notifications/mark-all-seen' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "scope": "string",
  "scope_id": "string",
  "topic": [],
  "severity": [],
  "live_business_id": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/notifications/mark-all-seen', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "scope": "string",
  "scope_id": "string",
  "topic": [],
  "severity": [],
  "live_business_id": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "scope": "string",
  "scope_id": "string",
  "topic": [],
  "severity": [],
  "live_business_id": "string"
}

response = httpx.post("https://api.ondayzero.com/api/v1/notifications/mark-all-seen", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/notifications/mark-all-seen
- OpenAPI slice: https://www.ondayzero.com/docs/reference/notifications/mark-all-seen/openapi.json
- Other endpoints in **notifications**: https://www.ondayzero.com/docs/reference/notifications
