# PUT /api/v1/preferences/notifications/topics

> Update Topic Overrides Endpoint

- **Tag:** notification-preferences
- **Operation ID:** `update_topic_overrides_endpoint_api_v1_preferences_notifications_topics_put`

## Description

Replace the per-topic channel override map for the current user.

Validation is permissive: unknown topics or unknown channels
are silently dropped by ``extract_topic_overrides`` rather
than rejected, so a forward-compatible client (e.g. one that
knows about a topic the server hasn't deployed yet) won't
break the save.

## Authentication

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

## Request body

Schema: `TopicChannelOverridesUpdate`

- `overrides` (object)

## Responses

### 200 — Successful Response

Schema: `TopicChannelOverridesResponse`

- `overrides` (object) — Map of topic -> {channel: bool}
- `available_channels` (array · string) — Channels the override grid can toggle

### 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 PUT 'https://api.ondayzero.com/api/v1/preferences/notifications/topics' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "overrides": {}
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/preferences/notifications/topics', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "overrides": {}
}),
});
const data = await response.json();
```

### Python

```python
import httpx

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

payload = {
  "overrides": {}
}

response = httpx.put("https://api.ondayzero.com/api/v1/preferences/notifications/topics", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/notification-preferences/update-topic-overrides-endpoint
- OpenAPI slice: https://www.ondayzero.com/docs/reference/notification-preferences/update-topic-overrides-endpoint/openapi.json
- Other endpoints in **notification-preferences**: https://www.ondayzero.com/docs/reference/notification-preferences
