---
title: "Upsert workspace rule"
method: PUT
path: "/notification-preferences/workspaces/{workspaceId}"
tags: ["Notification Preferences"]
---

# Upsert workspace rule

`PUT /notification-preferences/workspaces/{workspaceId}`

Create or replace the notification rule for one workspace, overriding the global settings there.

## Path parameters

- `workspaceId` string, required

## Request body

- object
  - `isActive` boolean, required
  - `emailEnabled` boolean, required
  - `ntfyEnabled` boolean, required
  - `gotifyEnabled` boolean, required
  - `webhookEnabled` boolean, required
  - `projectMode` 'all' | 'selected', required
  - `selectedProjectIds` string[] — Required in practice when projectMode is `selected`.

## Response `200`

The updated preferences

- NotificationPreferences
  - `emailAddress` string, nullable, required
  - `emailEnabled` boolean, required
  - `ntfyEnabled` boolean, required
  - `ntfyConfigured` boolean, required
  - `ntfyServerUrl` string, nullable, required
  - `ntfyTopic` string, nullable, required
  - `ntfyTokenConfigured` boolean, required
  - `maskedNtfyToken` string, nullable, required
  - `gotifyEnabled` boolean, required
  - `gotifyConfigured` boolean, required
  - `gotifyServerUrl` string, nullable, required
  - `gotifyTokenConfigured` boolean, required
  - `maskedGotifyToken` string, nullable, required
  - `webhookEnabled` boolean, required
  - `webhookConfigured` boolean, required
  - `webhookUrl` string, nullable, required
  - `webhookSecretConfigured` boolean, required
  - `maskedWebhookSecret` string, nullable, required
  - `taskAssignmentEnabled` boolean, required
  - `taskCommentEnabled` boolean, required
  - `taskStatusChangeEnabled` boolean, required
  - `dueDateReminderEnabled` boolean, required
  - `dueDateReminderLeadTimeMinutes` number, required — How long before a due date the reminder fires, in minutes.
  - `workspaces` NotificationPreferenceWorkspaceRule[], required — Per-workspace overrides. A workspace with no rule follows the global settings.
    - `id` string, required
    - `workspaceId` string, required
    - `workspaceName` string, required
    - `isActive` boolean, required — Turn all notifications for this workspace on or off.
    - `emailEnabled` boolean, required
    - `ntfyEnabled` boolean, required
    - `gotifyEnabled` boolean, required
    - `webhookEnabled` boolean, required
    - `projectMode` 'all' | 'selected', required — `all` notifies for every project in the workspace; `selected` restricts it to selectedProjectIds.
    - `selectedProjectIds` string[], required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `createdAt` string, date-time, nullable, required
  - `updatedAt` string, date-time, nullable, required

## Other responses

- `400` — Invalid request
- `401` — Missing or invalid credentials
- `403` — No access to the workspace

## Changes

- **2026-08-24** `08bbb5bedb5d` — 5 breaking, 7 info
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `401`
  - removed the media type `application/json` for the response with the status `403`
  - the `createdAt` response's property type/format changed from ``/`` to `string, null`/`date-time` for status `200`
  - …8 more
- **2026-07-11** `32cece1ebe43` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/notification-preferences/workspaces/:workspaceId/put.md)

---

[API](https://skmtc.dev/usekaneo/apis/kaneo-api.md) · [All operations](https://skmtc.dev/usekaneo/apis/kaneo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/usekaneo/kaneo-api/revisions/9d1da42c10ce/schema)
