# Client — Notifications

<a id="get-api-v1-client-notifications"></a>
#### `GET /api/v1/client/notifications`

*List notifications (client)*

Return paginated notifications for the authenticated client with optional unread/category filters.

**Query parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `limit` | integer | no | minimum=1; maximum=200 |
| `unread_only` | boolean | no | — |
| `category` | string | no | — |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/notifications
```

---

<a id="post-api-v1-client-notifications-read-all"></a>
#### `POST /api/v1/client/notifications/read-all`

*Mark all read (client)*

Mark all unread notifications as read for the authenticated client.

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/notifications/read-all
```

---

<a id="get-api-v1-client-notifications-settings"></a>
#### `GET /api/v1/client/notifications/settings`

*Get notification preferences (client)*

Return notification preferences (channel toggles, severity filters) for the authenticated client.

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/notifications/settings
```

---

<a id="put-api-v1-client-notifications-settings"></a>
#### `PUT /api/v1/client/notifications/settings`

*Update notification preferences (client)*

Update the authenticated client's own notification toggles (channel and category switches). Server-wide blocks — SMTP, event matrix, templates — are not accepted on this path.

**Body fields:**

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `email_categories` | array<string> | no | — |
| `email_enabled` | boolean | no | — |
| `panel_categories` | array<string> | no | — |
| `panel_enabled` | boolean | no | — |

**Request body example:**

```json
{
  "email_categories": [
    "string"
  ],
  "email_enabled": false,
  "panel_categories": [
    "string"
  ],
  "panel_enabled": false
}
```

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/client/notifications/settings
```

---

<a id="get-api-v1-client-notifications-unread-count"></a>
#### `GET /api/v1/client/notifications/unread-count`

*Get unread count (client)*

Return the count of unread notifications for the authenticated client.

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/notifications/unread-count
```

---

<a id="post-api-v1-client-notifications-notif-id-read"></a>
#### `POST /api/v1/client/notifications/{notif_id}/read`

*Mark notification read (client)*

Mark a single notification as read for the authenticated client.

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `notif_id` | string | yes | — |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/notifications/{notif_id}/read
```

---
