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

# Add Users to Groups

Use this API to add users to a specific organization user group.

# Endpoint

`POST https://api.velt.dev/v1/organizations/usergroups/users/add`

# 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="organizationUserGroupId" type="string" required>
      Organization User Group ID
    </ParamField>

    <ParamField body="userIds" type="string[]" required>
      Array of User IDs
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

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

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Added organization users to group successfully.",
    "data": {
      "yourUserId1": {
        "success": true,
        "organizationUserGroupId": "yourGroupId",
        "message": "User added to organization user group."
      }
    }
  }
}
```

#### Failure Response

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

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Added organization users to group successfully.",
      "data": {
        "yourUserId1": {
          "success": true,
          "organizationUserGroupId": "yourGroupId",
          "message": "User added to organization user group."
        }
      }
    }
  }
  ```
</ResponseExample>
