> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Notification Config

Use this API to update the in-app notification service configuration for a workspace. At least one of `useNotificationService` or `notificationServiceConfig` must be provided. The config is deep-merged with the existing value, so omitted sub-fields are preserved.

> [!NOTE]
>
> This endpoint uses **API-key-level auth**: pass `x-velt-api-key` and `x-velt-auth-token` as headers. You can obtain these from the [Get Auth Tokens](https://velt.dev/docs/api-reference/rest-apis/v2/workspace/authtokens-get.md) endpoint.

> [!NOTE]
>
> The numeric delay/batching fields must be integers within these ranges, otherwise the request is rejected with `INVALID_ARGUMENT`:
>
> * `delayConfig.delaySeconds`: `10`–`15552000` (10 seconds to 6 months)
> * `batchConfig.document.batchWindowSeconds` / `batchConfig.user.batchWindowSeconds`: `10`–`604800` (10 seconds to 1 week)
> * `batchConfig.document.maxActivities` / `batchConfig.user.maxActivities`: `2`–`50`

> [!NOTE]
>
> **Defaults on first enable.** If you enable the service (`useNotificationService: true`) and the stored config has no `triggers` yet (defaults are seeded even if `delayConfig` / `batchConfig` already exist), a default set of triggers is seeded automatically: the standard `comment` triggers and all `huddle` triggers are turned on. Delay and batching stay off — no `delayConfig` or `batchConfig` is written by the seeding. Existing non-trigger fields are preserved, and any `notificationServiceConfig` values you send in the same request are merged on top of these defaults.

> [!NOTE]
>
> The response `data` echoes the latest post-write state as `{ useNotificationService, notificationServiceConfig }` — the same shape returned by [Get Notification Config](https://velt.dev/docs/api-reference/rest-apis/v2/workspace/notificationconfig-get.md). Fields not part of your request fall back to the existing stored values.

# Endpoint

`POST https://api.velt.dev/v2/workspace/notificationconfig/update`

# Headers

**x-velt-api-key** `string` *required*

Your API key.

**x-velt-auth-token** `string` *required*

Your [Auth Token](https://velt.dev/docs/security/auth-tokens.md).

# Body

#### Params

**data** `object` *required*

**properties**

**useNotificationService** `boolean`

Whether to enable the in-app notification service.

**notificationServiceConfig** `object`

Notification service configuration object.

**properties**

**triggers** `object`

Event triggers that activate in-app notifications. Supports `comment` and `huddle` trigger groups. Each is a map of event-type string to a boolean to enable (`true`) or disable (`false`) that trigger. See [Webhooks](https://velt.dev/docs/webhooks/advanced.md) for the full list of event types.

**delayConfig** `object`

Notification delay settings.

**properties**

**isEnabled** `boolean`

Whether delayed notifications are enabled.

**delaySeconds** `number`

Delay before sending a notification, in seconds. Must be an integer between `10` and `15552000` (10 seconds to 6 months).

**batchConfig** `object`

Notification batching settings, with independent `document` and `user` configs.

**properties**

**document** `object`

Per-document batching.

**properties**

**isEnabled** `boolean`

Whether document-level batching is enabled.

**batchWindowSeconds** `number`

Time window to group document-level notifications, in seconds. Must be an integer between `10` and `604800` (10 seconds to 1 week).

**maxActivities** `number`

Flush the batch once this many activities accumulate. Must be an integer between `2` and `50`.

**user** `object`

Per-user batching.

**properties**

**isEnabled** `boolean`

Whether user-level batching is enabled.

**batchWindowSeconds** `number`

Time window to group user-level notifications, in seconds. Must be an integer between `10` and `604800` (10 seconds to 1 week).

**maxActivities** `number`

Flush the batch once this many activities accumulate. Must be an integer between `2` and `50`.

# Example Request

```JSON theme={null}
{
  "data": {
    "useNotificationService": true,
    "notificationServiceConfig": {
      "delayConfig": {
        "isEnabled": true,
        "delaySeconds": 30
      }
    }
  }
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Notification configuration updated successfully.",
    "data": {
      "useNotificationService": true,
      "notificationServiceConfig": {
        "delayConfig": {
          "isEnabled": true,
          "delaySeconds": 30
        }
      }
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "At least one of useNotificationService or notificationServiceConfig must be provided"
  }
}
```

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Notification configuration updated successfully.",
    "data": {
      "useNotificationService": true,
      "notificationServiceConfig": {
        "delayConfig": {
          "isEnabled": true,
          "delaySeconds": 30
        }
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.