---
title: "Get Users"
method: GET
path: "/v1/admin/users"
tags: ["Admin"]
---

# Get Users

`GET /v1/admin/users`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

## Query parameters

- `role_id` integer, nullable: The ID of the role to filter the users by.
- `organization_id` integer, nullable: The ID of the organization to filter the users by.
- `email` string, nullable: Email substring to filter the users by.
- `offset` integer: Number of users to skip.
- `limit` integer: Maximum number of users to return.
- `sort_by` 'id' | 'email' | 'created' | 'updated'
- `sort_order` 'asc' | 'desc'

## Response `200`

Successful Response

- UsersResponse
  - `object` 'list': Type of the object.
  - `total` integer, required: Total number of users matching the query.
  - `offset` integer, required: Number of users skipped.
  - `limit` integer, required: Maximum number of users returned.
  - `data` UserResponse[], required: List of users.
    - `object` 'user': Type of the object.
    - `id` integer, required: ID of the user.
    - `email` string, required: Email of the user.
    - `name` string, nullable: Name of the user.
    - `sub` string, nullable: Subject identifier for SSO.
    - `iss` string, nullable: Issuer identifier for SSO.
    - `role_id` integer, required: ID of the role assigned to the user.
    - `organization_id` integer, required: ID of the organization the user belongs to.
    - `budget` number, nullable: Budget allocated to the user.
    - `expires` integer, nullable: Expiration time of the user, as Unix timestamp.
    - `created` integer, required: Time of creation, as Unix timestamp.
    - `updated` integer, required: Time of last update, as Unix timestamp.
    - `priority` integer, required: Priority of the user. Higher value means higher priority.

## Other responses

- `401`: Invalid authentication scheme.<br>Invalid API key.
- `403`: User has no admin rights.<br>Your account has expired. Please contact support to renew your account.
- `422`: Validation Error

## Changes

- **2026-09-29** `2f7a4a0aac8f`: 1 info
  - endpoint added
- **2026-09-29** `da70d9cd1957`: 1 breaking
  - api path removed without deprecation
- **2026-09-21** `5fdbd3614b8c`: 2 info
  - the response property `data/items/organization_id` became required for the status `200`
  - response property `data/items/organization_id` list-of-types was narrowed by removing types `null` from media type `application/json` of response `200`
- **2026-08-27** `1627e468291c`: 1 breaking, 1 info
  - removed the required property `data/items/role` from the response with the `200` status
  - added the required property `data/items/role_id` to the response with the `200` status
- **2026-07-11** `0fd1d281f985`: 1 warning, 1 info
  - removed the optional property `data/items/organization` from the response with the `200` status
  - added the optional property `data/items/organization_id` to the response with the `200` status

[Operation history](https://skmtc.dev/betagouv/apis/opengatellm/changes/v1/admin/users/get.md)

---

[API](https://skmtc.dev/betagouv/apis/opengatellm.md) - [All operations](https://skmtc.dev/betagouv/apis/opengatellm/llms.txt) - [OpenAPI document](https://skmtc.dev/betagouv/apis/opengatellm/revisions/2f7a4a0aac8f?raw)
