For the complete documentation index, see llms.txt. This page is also available as Markdown.

Users

List Users Endpoint

get

List users.

Args: offset: Offset for pagination limit: Limit for pagination user_id: Filter by user ID oauth_provider: Filter by OAuth provider oauth_id: Filter by OAuth ID email: Filter by email is_active: Filter by active status user: Authorized user user_manager: User manager organization_manager: Organization manager rbac: RBAC component

Returns: List of users matching the filter criteria

Authorizations
OAuth2clientCredentialsRequired
Token URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Query parameters
offsetintegerOptionalDefault: 0
limitintegerOptionalDefault: 100
user_idstring · uuid · nullableOptional
oauth_providerstring · nullableOptional
oauth_idstring · nullableOptional
emailstring · nullableOptional
is_activeboolean · nullableOptional
Responses
200

Successful Response

application/json

User model for displaying user account and service account information.

This model is currently used for both user accounts and service accounts to ensure backward compatibility.

passwordstring · nullableOptional
password_expiredboolean · nullableOptional
namestring · min: 1 · max: 50 · nullableOptional

The name of the user.

avatar_urlstring · nullableOptional

The avatar URL of the user.

companystring · min: 1 · max: 50 · nullableOptional

The company of the user.

job_titlestring · min: 1 · max: 50 · nullableOptional

The job title of the user.

idstring · uuidRequired
usernameany ofRequired

The unique username for the account. For OAuth2 user accounts, this is the same as the email address.

string · min: 1 · max: 50OptionalPattern: ^[a-zA-Z0-9_\-@.]+$
or
string · emailOptional
emailstring · nullableOptional

The email address associated with the account. For OAuth2 user accounts, this is the unique identifier for the user and is also used as the username.

oauth_providerstring · nullableOptional

The external OAuth2 provider that the user is associated with.

oauth_idstring · nullableOptional

The external OAuth2 ID of the user.

is_activebooleanOptional

Whether the account is active.

Default: true
is_superuserbooleanOptional

Whether the account is a superuser.

Default: false
is_service_accountbooleanOptional

Whether the account is a service account.

Default: false
organization_idstring · uuid · nullableOptional

The ID of the organization that the service account belongs to. Only set for service accounts.

password_changed_atstring · date-time · nullableOptional

The time when the user's password was last changed.

is_onboardedbooleanOptional

Whether the user has completed onboarding.

Default: false
get/users
GET /users HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "password": "text",
    "password_expired": true,
    "name": "text",
    "avatar_url": "text",
    "company": "text",
    "job_title": "text",
    "metadata": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "username": "text",
    "email": "text",
    "oauth_provider": "text",
    "oauth_id": "text",
    "is_active": true,
    "is_superuser": false,
    "is_service_account": false,
    "organization_id": "123e4567-e89b-12d3-a456-426614174000",
    "password_changed_at": "2026-01-01T00:00:00.000Z",
    "is_onboarded": false
  }
]

Delete User Endpoint

delete

Delete a user.

Args: user_id: User ID to delete user: Authenticated user user_manager: User manager workspace_manager: Workspace manager organization_manager: Organization manager

Raises: ValueError: If the user is internal. IllegalOperationError: If the operation is not allowed.

Authorizations
OAuth2clientCredentialsRequired
Token URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
user_idstring · uuidRequired
Responses
200

Successful Response

application/json
anyOptional
delete/users/{user_id}
DELETE /users/{user_id} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Update User Endpoint

patch

Update a user.

Args: user_id: User ID user_update: User update user: Authenticated user user_manager: User manager

Returns: The updated user.

Raises: IllegalOperationError: If the operation is not allowed or the user does not exist.

Authorizations
OAuth2clientCredentialsRequired
Token URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
user_idstring · uuidRequired
Body

Model for user updates.

passwordstring · nullableOptional
password_expiredboolean · nullableOptional
namestring · min: 1 · max: 50 · nullableOptional

The name of the user.

avatar_urlstring · nullableOptional

The avatar URL of the user.

companystring · min: 1 · max: 50 · nullableOptional

The company of the user.

job_titlestring · min: 1 · max: 50 · nullableOptional

The job title of the user.

usernamestring · min: 1 · max: 50 · nullableOptional

New username for the user. Not possible to change the username for OAuth2 user accounts because it's the same as the email address provided by the external OAuth2 provider.

Pattern: ^[a-zA-Z0-9_\-@.]+$
emailstring · email · nullableOptional

New email address for the user. Not possible to change the email address for OAuth2 user accounts because it's the same as the email address provided by the external OAuth2 provider.

is_activeboolean · nullableOptional
is_onboardedboolean · nullableOptional
is_superuserboolean · nullableOptional
Responses
200

Successful Response

application/json

User model for displaying user account and service account information.

This model is currently used for both user accounts and service accounts to ensure backward compatibility.

passwordstring · nullableOptional
password_expiredboolean · nullableOptional
namestring · min: 1 · max: 50 · nullableOptional

The name of the user.

avatar_urlstring · nullableOptional

The avatar URL of the user.

companystring · min: 1 · max: 50 · nullableOptional

The company of the user.

job_titlestring · min: 1 · max: 50 · nullableOptional

The job title of the user.

idstring · uuidRequired
usernameany ofRequired

The unique username for the account. For OAuth2 user accounts, this is the same as the email address.

string · min: 1 · max: 50OptionalPattern: ^[a-zA-Z0-9_\-@.]+$
or
string · emailOptional
emailstring · nullableOptional

The email address associated with the account. For OAuth2 user accounts, this is the unique identifier for the user and is also used as the username.

oauth_providerstring · nullableOptional

The external OAuth2 provider that the user is associated with.

oauth_idstring · nullableOptional

The external OAuth2 ID of the user.

is_activebooleanOptional

Whether the account is active.

Default: true
is_superuserbooleanOptional

Whether the account is a superuser.

Default: false
is_service_accountbooleanOptional

Whether the account is a service account.

Default: false
organization_idstring · uuid · nullableOptional

The ID of the organization that the service account belongs to. Only set for service accounts.

password_changed_atstring · date-time · nullableOptional

The time when the user's password was last changed.

is_onboardedbooleanOptional

Whether the user has completed onboarding.

Default: false
patch/users/{user_id}
PATCH /users/{user_id} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 263

{
  "password": "text",
  "password_expired": true,
  "name": "text",
  "avatar_url": "text",
  "company": "text",
  "job_title": "text",
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "username": "text",
  "email": "name@gmail.com",
  "is_active": true,
  "is_onboarded": true,
  "is_superuser": true
}
{
  "password": "text",
  "password_expired": true,
  "name": "text",
  "avatar_url": "text",
  "company": "text",
  "job_title": "text",
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "username": "text",
  "email": "text",
  "oauth_provider": "text",
  "oauth_id": "text",
  "is_active": true,
  "is_superuser": false,
  "is_service_account": false,
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "password_changed_at": "2026-01-01T00:00:00.000Z",
  "is_onboarded": false
}
ZenML Scarf

Last updated

Was this helpful?