Skip to main content
paradime.admin.users manages a workspace’s members, former members and invitees, and the email domains whose users join the workspace on sign-up. For the GraphQL operations, see Users.
Prerequisites
  • These operations are available on every plan.
  • Your API key needs the User access admin capability group. To only list users and read auto-join domains, User access viewer is enough.
  • The admin client of the paradime-io package. See Admin client.
The examples on this page use this client:
paradime.users, the User Management module, also invites and disables users. paradime.admin.users adds statuses, pagination, reactivation and auto-join domains, and raises typed errors.

List users

Iterates over the workspace’s users, ordered by email, then status.
Optional[Sequence[UserStatus]]
default:"None"
Only users with one of these statuses: ACTIVE, INVITED or DEACTIVATED. Every status when left out.
Optional[str]
default:"None"
The workspace to read, for a company API key.
int
default:"100"
How many users to read per request, at most 500.
Iterator[AdminUser]
The users, read one page at a time.

Invite a user

Invites a person by email with a role, and sends them the invitation email. An email that already belongs to a user or to a pending invitation raises AdminConflictException. For a former member, use reactivate. A role that an API key can’t give in the workspace raises AdminValidationFailedException, with field set to ["input", "accountType"].
str
required
The email that the invitation is sent to.
UserAccountType
required
The role that the invitation gives. See Roles.
Optional[str]
default:"None"
The workspace to change, for a company API key.
AdminUser
The invitee, INVITED with a PENDING invitation.

Change a user’s role

Changes the role of an active member. Giving a user the role they hold is not an error.
str
required
The user’s uid.
UserAccountType
required
The role that the user gets.
Optional[str]
default:"None"
The workspace to change, for a company API key.
AdminUser
The user, with their new role. A uid that the workspace doesn’t know raises AdminNotFoundException.

Deactivate a user

Deactivates a member: they can no longer sign in to the workspace. reactivate brings them back with the same role. Deactivating a former member is not an error.
str
required
The user’s uid.
Optional[str]
default:"None"
The workspace to change, for a company API key.
AdminUser
The user, now DEACTIVATED.

Reactivate a user

Brings a former member back with the role they had. Reactivating an active user is not an error.
str
required
The user’s uid.
Optional[str]
default:"None"
The workspace to change, for a company API key.
AdminUser
The user, ACTIVE again.

Read auto-join domains

Reads the email domains whose users join the workspace on sign-up. See Enable auto-join.
Optional[str]
default:"None"
The workspace to read, for a company API key.
List[str]
The domains, lowercase and sorted. Empty when auto-join is off.

Set auto-join domains

Replaces the workspace’s auto-join domains. An empty list turns auto-join off.
Sequence[str]
required
Email domains, such as example.com. Paradime matches them in lowercase.
Optional[str]
default:"None"
The workspace to change, for a company API key.
List[str]
The domains now set.

Types

Import the model and enums from paradime.apis.admin.users.types.
model

Roles

UserAccountType values and the roles they stand for in Paradime. See Roles and permissions.