# List Users

Lists all users belonging to the authenticated organization. You can optionally filter the results by account group or account ID.

**GET** `/organizations/users`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Lists users. Optionally filter by account_group_id or account_id.

## Authorization

- PUBLIC-API-KEY (apiKey in header)
- PRIVATE-SECRET-KEY (apiKey in header)

## Query parameters

- `account_group_id` (string)
  Filter by account group.
- `account_id` (string)
  Filter by account.
- `page` (integer)
  Page number.
- `page_size` (integer)
  Page size.

## Responses

### 200

OK

- `data` (object[])
  - `id` (string<uuid>)
  - `email` (string)
  - `first_name` (string)
  - `last_name` (string)
  - `account_permissions` (object[])
    - `account_id` (string<uuid>)
    - `role_id` (string)
  - `account_group_permissions` (object[])
    - `account_group_id` (string<uuid>)
    - `role_id` (string)
  - `created_at` (string<date-time>)
  - `updated_at` (string<date-time>)
- `pagination` (object)
  - `page` (integer)
  - `page_size` (integer)
  - `total_items` (integer)
  - `total_pages` (integer)
  - `has_next` (boolean)
  - `has_previous` (boolean)

Example:

```json
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "email": "string",
      "first_name": "string",
      "last_name": "string",
      "account_permissions": [
        {
          "account_id": "00000000-0000-0000-0000-000000000000",
          "role_id": "string"
        }
      ],
      "account_group_permissions": [
        {
          "account_group_id": "00000000-0000-0000-0000-000000000000",
          "role_id": "string"
        }
      ],
      "created_at": "1970-01-01T00:00:00.000Z",
      "updated_at": "1970-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 0,
    "page_size": 0,
    "total_items": 0,
    "total_pages": 0,
    "has_next": true,
    "has_previous": true
  }
}
```