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

# Get 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 get the notifications config for users.

# Endpoint

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

# 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 fetched for these documents for the specified user. Max 30 documents can be fetched at a time. Optional when `getOrganizationConfig` is `true`.

**userId** `string` *required*

The ID of the user.

**getOrganizationConfig** `boolean`

When `true`, fetches the org-level notification config for the user. `documentIds` is not required in this mode.

## **Example Requests**

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

> [tab] Org-Level Config
>
> ```JSON theme={null}
> {
>     "data": {
>         "organizationId": "org1",
>         "userId": "USER_ID1",
>         "getOrganizationConfig": true
>     }
> }
> ```

# Response

#### Success Response

```JSON theme={null}
{
    "result": {
        "status": "success",
        "message": "User config fetched successfully.",
        "data": [
            {
                "config": {
                    "inbox": "ALL",
                    "email": "ALL"
                },
                "metadata": {
                    "organizationId": "org1",
                    "apiKey": "API_KEY",
                    "documentId": "doc1",
                    "userId": "USER_ID1"
                }
            }
        ]
    }
}
```

#### Failure Response

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

```js theme={null}
{
    "result": {
        "status": "success",
        "message": "User config fetched successfully.",
        "data": [
            {
                "config": {
                    "inbox": "ALL",
                    "email": "ALL"
                },
                "metadata": {
                    "organizationId": "org1",
                    "apiKey": "API_KEY",
                    "documentId": "doc1",
                    "userId": "USER_ID1"
                }
            }
        ]
    }
}
```


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