> ## 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 All User Data

> Get all feature data for a user stored in Velt.

Use this API to get all feature data for a user stored in Velt.

* The data will be paginated and returned in chunks of 100 items per feature data.
* You can use the `nextPageToken` returned in the response to fetch the next chunk of data.
* If there are no more items to fetch, the `nextPageToken` will not be returned.
* Here is the data that will be included:
  * **User profile data:** If they were added to any organization, document or folder.
  * **Comments data:** All the comments created by the user or where they were involved in.
  * **Reactions data:** All the reactions created by the user.
  * **Notifications data:** All the notifications where the user was involved in.
  * **Recordings data:** All the recordings created by the user.

<Warning>
  This API may take a few seconds to return a response depending on the dataset size.
</Warning>

# Endpoint

`POST https://api.velt.dev/v2/users/data/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 organization Id of the organization that the user is part of.
    </ParamField>

    <ParamField body="userId" type="string" required>
      The user Id of the user you want to get the data for.
    </ParamField>

    <ParamField body="pageToken" type="string">
      Page token retrieved from previous API call.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Request**

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "userId": "yourUserId",
    "pageToken": "yourPageToken"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success", 
    "message": "Data fetched successfully.",
    "data": {
      "comments": [..], //Upto 100 items. Empty array if no items are found.
      "reactions": [..], //Upto 100 items. Empty array if no items are found.
      "recordings": [..], //Upto 100 items. Empty array if no items are found.
      "notifications": [..] //Upto 100 items. Empty array if no items are found.
    },
    "nextPageToken": "bhdwdqwjs298e39e479ddkeuw==329" // This will be null if there are no more items to fetch.
  }
}

```

#### Failure Response

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

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success", 
      "message": "Data fetched successfully.",
      "data": {
        "comments": [..], //Upto 100 items. Empty array if no items are found.
        "reactions": [..], //Upto 100 items. Empty array if no items are found.
        "recordings": [..], //Upto 100 items. Empty array if no items are found.
        "notifications": [..] //Upto 100 items. Empty array if no items are found.
      },
      "nextPageToken": "bhdwdqwjs298e39e479ddkeuw==329" //This will be null if there are no more items to fetch.
    }
  }
  ```
</ResponseExample>
