> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velt.dev/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)
</Warning>

Use this API to set the notifications config for users.

# Endpoint

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

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="organizationId" type="string" required>
      The ID of the organization.
    </ParamField>

    <ParamField body="documentIds" type="string[]" required>
      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.
    </ParamField>

    <ParamField body="userId" type="string" required>
      The ID of the user.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Request**

```JSON theme={null}
{
    "data": {
        "organizationId": "org1",
        "documentIds": ["doc1"],
        "userId":"USER_ID1"
    }
}

```

# 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"
  }
}
```

<ResponseExample>
  ```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"
                  }
              }
          ]
      }
  }
  ```
</ResponseExample>
