Users
UsersService provides operations for managing users and their primary accounts.
Base path: /users
POST /users/ListUsers
Section titled “POST /users/ListUsers”ListUsers retrieves all users with pagination.
Request (ListUsersRequest)
| Field | Type | Description |
|---|---|---|
page_size | int32? | page_size: Maximum number of users to return per page (default: 50, max: 1000). |
page_token | string? | page_token: Token from previous response to retrieve the next page. |
Response (ListUsersResponse)
| Field | Type | Description |
|---|---|---|
users | User[] | users: The list of users for this page. |
next_page_token | string | next_page_token: Token to pass to the next ListUsersRequest. Empty when no more results. |
POST /users/GetUser
Section titled “POST /users/GetUser”GetUser retrieves a specific user together with their primary account context.
Request (GetUserRequest)
| Field | Type | Description |
|---|---|---|
user_id | string | user_id: The user to retrieve (usr_ prefix). |
Response (GetUserResponse)
| Field | Type | Description |
|---|---|---|
user | User | user: The requested user. |
primary_account | common.v1.Account? | primary_account: Present when the user has a primary_account_id. |
primary_account_aliases | aliases.v1.Alias[] | primary_account_aliases: Aliases for the primary account (admin view includes invisible/system aliases). |
POST /users/UpdateUser
Section titled “POST /users/UpdateUser”UpdateUser updates user properties. Optionally renames the user’s primary account.
Request (UpdateUserRequest)
| Field | Type | Description |
|---|---|---|
user_id | string | user_id: The user to update (usr_ prefix). |
display_name | string? | display_name: New display name for the user. Omit to leave unchanged. |
is_active | bool? | is_active: Set to false to suspend the user’s access. |
is_admin | bool? | is_admin: Set to true to grant or revoke administrative privileges. |
account_name | string? | account_name: When set, renames the user’s primary account. |
Response (UpdateUserResponse)
| Field | Type | Description |
|---|---|---|
user | User | user: The updated user. |
POST /users/DeleteUser
Section titled “POST /users/DeleteUser”DeleteUser soft-deletes a user. Set purge_data=true to also destroy the primary account and all mailbox data.
Request (DeleteUserRequest)
| Field | Type | Description |
|---|---|---|
user_id | string | user_id: The user to delete (usr_ prefix). |
purge_data | bool | purge_data: When true, also deletes the user’s primary account and all mailbox data. Use with caution — this is irreversible. |
Response (DeleteUserResponse)
No fields.
POST /users/AddUserAccountCapability
Section titled “POST /users/AddUserAccountCapability”AddUserAccountCapability idempotently adds a new JMAP capability to the user’s primary account and provisions the required resources.
Request (AddUserAccountCapabilityRequest)
| Field | Type | Description |
|---|---|---|
user_id | string | |
capability | common.v1.AccountCapability | capability: The JMAP capability to add. See common.v1.AccountCapability for valid values. |
Response (AddUserAccountCapabilityResponse)
| Field | Type | Description |
|---|---|---|
user | User | user: The updated user with the new capability reflected in their primary account. |