> ## 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.

# Set Config

> [!WARNING]
>
> To use this API, you must have the this feature enabled in [Velt console](https://console.velt.dev/dashboard/config/notification)

Use this API to set the notifications config for users.

# Endpoint

`POST https://api.velt.dev/v2/notifications/config/set`

# 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**

**organizationId** `string` *required*

The ID of the organization.

**documentIds** `string[]`

An array of document IDs. The notification configuration will be applied to these documents for the specified users. When omitted, the config is applied at the organization level and stored as the user's default for all documents.

**userIds** `string[]` *required*

An array of user IDs. The notification configuration will be set for these users.

**config** `object` *required*

Object containing the notification preferences.

**properties**

**inbox** `string`

In-app inbox notification preference. Valid values:

<ul>
  <li>`ALL`: User receives all notifications in their inbox.</li>
  <li>`MINE`: User receives notifications in their inbox only for activities directly involving them (e.g., mentions, replies).</li>
  <li>`NONE`: User receives no notifications in their inbox.</li>
</ul>

Optional.

**email** `string`

Email notification preference. Valid values:

<ul>
  <li>`ALL`: User receives email notifications for all activities.</li>
  <li>`MINE`: User receives email notifications only for activities directly involving them.</li>
  <li>`NONE`: User receives no email notifications.</li>
</ul>

Optional.

**slack** `string`

Slack notification preference (requires Slack integration to be effective). Valid values:

<ul>
  <li>`ALL`: User receives Slack notifications for all activities.</li>
  <li>`MINE`: User receives Slack notifications only for activities directly involving them.</li>
  <li>`NONE`: User receives no Slack notifications.</li>
</ul>

Optional.

## **Example Requests**

> [tab] Document-Level Config
>
> ```JSON theme={null}
> {
>     "data": {
>         "organizationId": "org1",
>         "documentIds": ["doc1"],
>         "userIds": ["USER_ID1"],
>         "config": {
>             "inbox": "ALL",
>             "email": "ALL"
>         }
>     }
> }
> ```

> [tab] Org-Level Config
>
> ```JSON theme={null}
> {
>     "data": {
>         "organizationId": "org1",
>         "userIds": ["USER_ID1"],
>         "config": {
>             "inbox": "ALL",
>             "email": "ALL"
>         }
>     }
> }
> ```

# Response

#### Success Response

```JSON theme={null}
{
    "result": {
        "status": "success",
        "message": "User config set successfully.",
        "data": {
            "USER_ID1": {
                "success": true,
                "userId": "USER_ID1",
                "documentId": "doc1",
                "message": "User config set successfully."
            }
        }
    }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

```js theme={null}
{
    "result": {
        "status": "success",
        "message": "User config set successfully.",
        "data": {
            "USER_ID1": {
                "success": true,
                "userId": "USER_ID1",
                "documentId": "doc1",
                "message": "User config set successfully."
            }
        }
    }
}
```


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