# Update one notification kind

Source: https://workroad.app/docs/api/update-notification-kind

`PATCH https://workroad.app/api/v1/settings/notifications/{kind}`

Turns a kind's bell, email or push on or off, or changes when it is sent. Returns the kind as it now resolves.

- MCP tool: `updateNotificationKind` on `https://workroad.app/api/mcp`
- Required scopes: settings:update
- Test mode: `PATCH https://workroad.app/api/test/v1/settings/notifications/{kind}` checks the request and returns the example response without changing anything.

## Path parameters

- `kind`: one of `"TASK_DUE"`, `"EXAM_SOON"`, `"STREAK_AT_RISK"`, `"LESSON_STARTING"`, `"SCHEDULE_SHARE_CHANGED"`, `"GENERATION_FINISHED"`, `"RECORDING_READY"`, `"DIGEST"`, required. `TASK_DUE` before a task is due, `EXAM_SOON` before an exam, `STREAK_AT_RISK` when today's goal isn't met, `LESSON_STARTING` before a lesson, `SCHEDULE_SHARE_CHANGED` when someone shares a timetable or stops, `GENERATION_FINISHED` and `RECORDING_READY` when AI work finishes, `DIGEST` for the email digest.

## Request body

JSON.

- `inApp`: boolean
- `email`: boolean
- `push`: boolean
- `leadMinutes`: integer or null. `TASK_DUE`: 15, 60, 180, 1440. `LESSON_STARTING`: 5, 10, 15, 30. Null restores the default.
- `leadDays`: integer or null. `TASK_DUE` (all-day tasks): 0, 1, 2. `EXAM_SOON`: 1, 2, 3, 5, 7, 14; one value replaces the default of 3 days and 1 day before. Null restores the default.
- `localTime`: string or null. HH:MM for `TASK_DUE` (all-day tasks), `EXAM_SOON` and `STREAK_AT_RISK`. Null restores the default.

## Response

`200` OK

- `data`: object, required
  - `kind`: one of `"TASK_DUE"`, `"EXAM_SOON"`, `"STREAK_AT_RISK"`, `"LESSON_STARTING"`, `"SCHEDULE_SHARE_CHANGED"`, `"GENERATION_FINISHED"`, `"RECORDING_READY"`, `"DIGEST"`, required. `TASK_DUE` before a task is due, `EXAM_SOON` before an exam, `STREAK_AT_RISK` when today's goal isn't met, `LESSON_STARTING` before a lesson, `SCHEDULE_SHARE_CHANGED` when someone shares a timetable or stops, `GENERATION_FINISHED` and `RECORDING_READY` when AI work finishes, `DIGEST` for the email digest.
  - `inApp`: boolean, required. Shown in the bell and the notifications page.
  - `email`: boolean, required. Sent by email once the address is verified.
  - `push`: boolean, required. Sent as a push to every browser the user enabled.
  - `leadMinutes`: integer or null, required. Minutes before a timed task is due (`TASK_DUE`) or a lesson starts (`LESSON_STARTING`). Null for a kind without it.
  - `leadDays`: array of integer or null, required. Days before an all-day task is due (`TASK_DUE`) or an exam (`EXAM_SOON`). Null for a kind without it.
  - `localTime`: string or null, required. When all-day task, exam and streak reminders go out, as local HH:MM. Null for a kind without it.

### Example

```json
{
  "data": {
    "kind": "TASK_DUE",
    "inApp": true,
    "email": false,
    "push": true,
    "leadMinutes": 60,
    "leadDays": [
      1
    ],
    "localTime": "18:00"
  }
}
```

## Errors

Every error has the body `{ "error": { "code", "message", "details" } }`.

- `400`: Invalid body, no field to update, or a timing the kind doesn't use or allow. `details.field` names it and `details.reason` lists the allowed values.
- `401`: Missing, invalid, disabled or expired API key
- `403`: The API key lacks the required scope
- `404`: No resource with that id exists for this key's user
- `405`: Method not allowed. Use a method from the Allow header.
- `429`: Rate limit exceeded. Wait for Retry-After before retrying. The rate-limit headers are absent when the key's own limiter rejected the request before the per-endpoint bucket check ran.
- `500`: Internal server error
