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

Use this API to retrieve users based on various filters such as organization ID, document ID, organization user group IDs or user IDs. You can use these filters in various combinations to get the desired users. Some examples are shown below.

<Warning>
  Use this for SDK v3 or prior versions.
</Warning>

# Endpoint

`POST https://api.velt.dev/v1/users/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>
      Organization ID
    </ParamField>

    <ParamField body="documentId" type="string">
      Document ID
    </ParamField>

    <ParamField body="userIds" type="string[]">
      Array of User IDs. Limit: Only 30 items can be passed at a time.
    </ParamField>

    <ParamField body="organizationUserGroupIds" type="string[]">
      Array of Organization User Group IDs. Only 30 items can be passed at a time.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

#### 1. Get users by organizationId

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId"
  }
}
```

#### 2. Get users by documentId within an organization

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId"
  }
}
```

#### 3. Get users by specific user IDs in an organization

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "userIds": [
      "yourUserId1",
      "yourUserId2"
    ]
  }
}
```

#### 4. Get users by specific user IDs in the given organization and document

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "userIds": [
      "yourUserId1",
      "yourUserId2"
    ]
  }
}
```

#### 5. Get users by organization and organization user group IDs

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "organizationUserGroupIds": [
      "yourOrganizationUserGroupId"
    ]
  }
}
```

#### 6. Get users by organization, organization user group IDs and user IDs

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "userIds": [
      "yourUserId1",
      "yourUserId2"
    ],
    "organizationUserGroupIds": [
      "yourOrganizationUserGroupId"
    ]
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "User(s) retrieved successfully.",
    "data": [
      {
        "email": "userEmail@domain.com",
        "name": "userName",
        "userId": "yourUserId"
      }
    ]
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "Error retrieving user(s).",
    "status": "ERROR_CODE"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "User(s) retrieved successfully.",
      "data": [
        {
          "email": "userEmail@domain.com",
          "name": "userName",
          "userId": "yourUserId"
        }
      ]
    }
  }
  ```
</ResponseExample>
