Skip to content

Users

UsersService provides operations for managing users and their primary accounts.

Base path: /users

ListUsers retrieves all users with pagination.

Request (ListUsersRequest)

FieldTypeDescription
pageSizeint32?page_size: Maximum number of users to return per page (default: 50, max: 1000).
pageTokenstring?page_token: Token from previous response to retrieve the next page.

Response (ListUsersResponse)

FieldTypeDescription
usersUser[]users: The list of users for this page.
nextPageTokenstringnext_page_token: Token to pass to the next ListUsersRequest. Empty when no more results.

GetUser retrieves a specific user together with their primary account context.

Request (GetUserRequest)

FieldTypeDescription
userIdstringuser_id: The user to retrieve (usr_ prefix).

Response (GetUserResponse)

FieldTypeDescription
userUseruser: The requested user.
primaryAccountcommon.v1.Account?primary_account: Present when the user has a primary_account_id.
primaryAccountAliasesaliases.v1.Alias[]primary_account_aliases: Aliases for the primary account (admin view includes invisible/system aliases).

UpdateUser updates user properties. Optionally renames the user’s primary account.

Request (UpdateUserRequest)

FieldTypeDescription
userIdstringuser_id: The user to update (usr_ prefix).
displayNamestring?display_name: New display name for the user. Omit to leave unchanged.
isActivebool?is_active: Set to false to suspend the user’s access.
isAdminbool?is_admin: Set to true to grant or revoke administrative privileges.
accountNamestring?account_name: When set, renames the user’s primary account.

Response (UpdateUserResponse)

FieldTypeDescription
userUseruser: The updated user.

DeleteUser soft-deletes a user. Set purge_data=true to also destroy the primary account and all mailbox data.

Request (DeleteUserRequest)

FieldTypeDescription
userIdstringuser_id: The user to delete (usr_ prefix).
purgeDataboolpurge_data: When true, also deletes the user’s primary account and all mailbox data. Use with caution — this is irreversible.

Response (DeleteUserResponse)

No fields.

AddUserAccountCapability idempotently adds a new JMAP capability to the user’s primary account and provisions the required resources.

Request (AddUserAccountCapabilityRequest)

FieldTypeDescription
userIdstring
capabilitycommon.v1.AccountCapabilitycapability: The JMAP capability to add. See common.v1.AccountCapability for valid values.

Response (AddUserAccountCapabilityResponse)

FieldTypeDescription
userUseruser: The updated user with the new capability reflected in their primary account.