> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Listing User Groups

> List user groups with optional filters.

> [!WARNING]
>
> You are reading the docs of Galtea 5.16. [Read this page in the latest version](https://docs.galtea.ai/sdk/api/user-group/list.md).

## Returns

Returns a list of [User Group](https://docs.galtea.ai/v5.16/concepts/user-group.md) objects.

## Example

```python theme={"system"}
user_groups = galtea.user_groups.list(
    sort_by_created_at="desc",
    limit=10,
)
```

## Parameters

**organization\_id** `string`

Filter user groups by organization ID.

**from\_created\_at** `str | int` (default: None)

Filter groups created at or after this timestamp. Accepts ISO 8601 string (e.g., `'2024-01-01T00:00:00Z'`) or Unix timestamp in seconds.

**to\_created\_at** `str | int` (default: None)

Filter groups created at or before this timestamp. Accepts ISO 8601 string (e.g., `'2024-12-31T23:59:59Z'`) or Unix timestamp in seconds.

**sort\_by\_created\_at** `string`

Sort groups by creation date. Valid values are `"asc"` and `"desc"`.

**offset** `int` (default: 0)

Number of groups to skip before starting to collect results. Use for pagination.

**limit** `int` (default: 10000)

Maximum number of groups to return in a single request.

**id** `string | list[string]` (default: None)

The ID or IDs of the user group(s) to retrieve.


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