# User Management

## Overview

{% hint style="info" %}

* This feature is available with the [**Paradime Enterprise pack**](https://www.paradime.io/enterprise).&#x20;
* Your API keys ***must*** have either [User Management Admin or User Metadata Viewer capabilities](/app-help/~/changes/rDjfrwa4QH3nWWrOItTq/developers/generate-api-keys.md).
  {% endhint %}

The User Management module enables you to efficiently administer and regulate user access within your workspace.&#x20;

This module offers a comprehensive set of tools to list all users, send invitations to new members, disable users' accounts, and precisely control users' roles and permissions.

## Get all active users

Retrieves all active users.

{% tabs %}
{% tab title="Args" %}
**`none`**
{% endtab %}

{% tab title="Returns" %}
*`List[ActiveUser]`*: A list of active user objects.
{% endtab %}
{% endtabs %}

```python
# First party modules
from paradime import Paradime

# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# Get all active users
active_users = paradime.users.list_active()
```

## Get a user by email

Retrieves a user by email.

{% tabs %}
{% tab title="Args" %}
**`email`** *`(str)`*: The email of the user to retrieve.
{% endtab %}

{% tab title="Returns" %}
*`ActiveUser`*: The user object.
{% endtab %}
{% endtabs %}

```python
# First party modules
from paradime import Paradime

# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# Get a user by email
user = paradime.users.get_by_email(email="john@acme.io")
```

## Get all invited users

Retrieves all invited users.

{% tabs %}
{% tab title="Args" %}
**`none`**
{% endtab %}

{% tab title="Returns" %}
*`List[InvitedUser]`*: A list of invited user objects.
{% endtab %}
{% endtabs %}

```python
# First party modules
from paradime import Paradime

# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# Get all invited users
invited_users = paradime.users.list_invited()
```

## Invite a user

Invites a user to the workspace.

{% tabs %}
{% tab title="Args" %}
**`email`** *`(str)`*: The email of the user to invite.

**`account_type`** *`(UserAccountType)`*: The account type of the user to invite.
{% endtab %}

{% tab title="Returns" %}
*`none`*
{% endtab %}
{% endtabs %}

```python
# First party modules
from paradime import Paradime
from paradime.apis.users.types import UserAccountType

# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# Invite a user as an admin
paradime.users.invite(email="bhuvan@paradime.io", account_type=UserAccountType.ADMIN)

```

## Update a user's account type

Updates the account type of a user.

{% tabs %}
{% tab title="Args" %}
**`uid`** *`(str)`*: The ID of the user to update the account type for.

**`account_type`** *`(UserAccountType)`*: The new account type for the user.
{% endtab %}

{% tab title="Returns" %}
*`none`*
{% endtab %}
{% endtabs %}

```python
# First party modules
from paradime import Paradime
from paradime.apis.users.types import UserAccountType

# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# Update a user's account type
paradime.users.update_account_type(user_uid=user.uid, account_type=UserAccountType.DEVELOPER)
```

## Disable a user

Disable a user in the workspace.

{% tabs %}
{% tab title="Args" %}
**`uid`** *`(str)`*: The ID of the user to disable.
{% endtab %}

{% tab title="Returns" %}
*`none`*
{% endtab %}
{% endtabs %}

```python
# First party modules
from paradime import Paradime

# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# Disable a user
paradime.users.disable(user_uid=user.uid)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/~/changes/rDjfrwa4QH3nWWrOItTq/developers/python-sdk/modules/user-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
