> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Administration API: Users

> List a workspace's users by status, invite users, change their roles, deactivate and reactivate them, and set auto-join domains with the Administration API.

Manage who can use a workspace from code: list its members, former members, and invitees, invite people with a role, change roles, deactivate and reactivate members, and set the email domains whose users join without an invitation.

> [!NOTE]
>
> **Prerequisites:**
>
> * These operations are available on every plan.
> * An account API key with the `X-Paradime-Workspace` header, or a workspace API key.
> * The **User access admin** capability group. To only list users and read auto-join domains, **User access viewer** is enough.
>
> Keys, errors, and pagination work the same in every area. See [Conventions](https://docs.paradime.io/developers/graphql-api/admin-api/conventions.md).

## Operations

| Operation | Type | What it does | Capability group |
| - | - | - | - |
| [`users`](https://docs.paradime.io/graphql-reference/queries/users) | Query | Lists the workspace's members, former members, and invitees, by status. | User access admin or User access viewer |
| [`createUser`](https://docs.paradime.io/graphql-reference/mutations/createUser) | Mutation | Invites a person by email with a role, and sends the invitation email. | User access admin |
| [`updateUser`](https://docs.paradime.io/graphql-reference/mutations/updateUser) | Mutation | Changes the role of an active member. | User access admin |
| [`deactivateUser`](https://docs.paradime.io/graphql-reference/mutations/deactivateUser) | Mutation | Deactivates a member, who can no longer sign in to the workspace. | User access admin |
| [`reactivateUser`](https://docs.paradime.io/graphql-reference/mutations/reactivateUser) | Mutation | Reactivates a former member, with the role they had. | User access admin |
| [`Workspace.autoJoinDomains`](https://docs.paradime.io/graphql-reference/types/Workspace) | Field | Reads the email domains whose users join the workspace without an invitation. | User access admin or User access viewer |
| [`setAutoJoinDomains`](https://docs.paradime.io/graphql-reference/mutations/setAutoJoinDomains) | Mutation | Replaces the auto-join domains. | User access admin |

> [!TIP]
>
> For new code, use these operations rather than `listUsers`, `inviteUser`, `updateUserAccountType`, and `disableUser` from the [User Management API](https://docs.paradime.io/developers/graphql-api/api-reference/user-management-api). The new ones report errors with a code, page their results, filter by status, and can reactivate a user. The older operations keep working, with the **User management admin** and **User metadata viewer** groups. Those groups don't grant the new operations.

## List users

`users` lists the people of the targeted workspace, ordered by email, then status. `status` is `ACTIVE` for a member who can sign in, `INVITED` for someone who hasn't signed up yet, and `DEACTIVATED` for a former member. Pass `status` to list only some of them: every status is listed when you leave it out.

An invitee has no `uid`, and `inviteStatus` says whether their invitation link still works (`PENDING`) or not (`EXPIRED`). For everyone else, `uid` is the id that `updateUser`, `deactivateUser`, and `reactivateUser` take.

```graphql theme={"system"}
query Users($status: [UserStatus!], $first: Int, $after: String) {
  users(status: $status, first: $first, after: $after) {
    totalCount
    pageInfo {
      hasNextPage
      endCursor
    }
    edges {
      node {
        email
        uid
        fullName
        accountType
        status
        inviteStatus
        invitedAt
        lastLoginAt
      }
    }
  }
}
```

```json theme={"system"}
{
  "status": ["ACTIVE", "INVITED"],
  "first": 100
}
```

> [accordion] Example response
>
> ```json theme={"system"}
> {
>   "data": {
>     "users": {
>       "totalCount": 2,
>       "pageInfo": {
>         "hasNextPage": false,
>         "endCursor": "WyJqYW1pZUBleGFtcGxlLmNvbSJd"
>       },
>       "edges": [
>         {
>           "node": {
>             "email": "alex@example.com",
>             "uid": "u_8c2e41d7",
>             "fullName": "Alex Doe",
>             "accountType": "DEVELOPER",
>             "status": "ACTIVE",
>             "inviteStatus": null,
>             "invitedAt": null,
>             "lastLoginAt": "2026-11-25T16:40:12+00:00"
>           }
>         },
>         {
>           "node": {
>             "email": "jamie@example.com",
>             "uid": null,
>             "fullName": null,
>             "accountType": "BUSINESS",
>             "status": "INVITED",
>             "inviteStatus": "PENDING",
>             "invitedAt": "2026-11-26T08:02:51+00:00",
>             "lastLoginAt": null
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Invite a user

`createUser` invites a person to the targeted workspace with a role, and sends them the invitation email. The invitee then appears in `users` as `INVITED`, with a `PENDING` invitation.

* An email that belongs to a member, a former member, or a pending invitation is a `CONFLICT`. To bring back a former member, use `reactivateUser`.
* An expired invitation is not a conflict: call `createUser` again to send a new one.

An API key can give the roles an Admin can give, except `SANDBOX_USER`: `ADMIN`, `DEVELOPER`, `BUSINESS`, `BILLING_ADMIN`, `SECURITY_ADMIN`, `WORKSPACE_SETTINGS_ADMIN`, `WORKSPACE_ADMIN`, and `ANALYST`. Without [role-based access control](https://docs.paradime.io/products/settings/users/role-based-access-control.md), only `ADMIN`, `DEVELOPER`, and `BUSINESS` are offered. Any other role is `VALIDATION_FAILED`.

```graphql theme={"system"}
mutation InviteUser($input: CreateUserInput!) {
  createUser(input: $input) {
    user {
      email
      accountType
      status
      inviteStatus
      invitedAt
    }
  }
}
```

```json theme={"system"}
{
  "input": {
    "email": "jamie@example.com",
    "accountType": "BUSINESS"
  }
}
```

## Change a role, deactivate, or reactivate a user

Each of these takes the user's `uid`.

* `updateUser` changes the role of an active member. Giving a user the role they hold is not an error. A deactivated user is a `CONFLICT`: reactivate them first.
* `deactivateUser` deactivates a member: they can no longer sign in to the workspace. Deactivating a former member is not an error.
* `reactivateUser` brings back a former member, with the role they had. Reactivating an active member is not an error. If an API key can't give the user's role, the call is `VALIDATION_FAILED`: reactivate them in Paradime.

```graphql theme={"system"}
mutation ChangeRole($input: UpdateUserInput!) {
  updateUser(input: $input) {
    user {
      uid
      accountType
      status
    }
  }
}
```

```json theme={"system"}
{
  "input": {
    "uid": "u_8c2e41d7",
    "accountType": "ADMIN"
  }
}
```

```graphql theme={"system"}
mutation Deactivate($input: DeactivateUserInput!) {
  deactivateUser(input: $input) {
    user {
      uid
      status
      accountType
    }
  }
}
```

```json theme={"system"}
{
  "input": {
    "uid": "u_8c2e41d7"
  }
}
```

To reactivate the same user, send the same input to `reactivateUser`:

```graphql theme={"system"}
mutation Reactivate($input: ReactivateUserInput!) {
  reactivateUser(input: $input) {
    user {
      uid
      status
      accountType
    }
  }
}
```

```json theme={"system"}
{
  "input": {
    "uid": "u_8c2e41d7"
  }
}
```

## Set auto-join domains

With [auto-join](https://docs.paradime.io/products/settings/users/enable-auto-join.md), people whose email is at one of the workspace's domains join it when they sign in, without an invitation. `setAutoJoinDomains` replaces the full set of domains. Domains are matched in lowercase. An empty list turns auto-join off.

```graphql theme={"system"}
mutation AutoJoin($input: SetAutoJoinDomainsInput!) {
  setAutoJoinDomains(input: $input) {
    workspace {
      autoJoinDomains
    }
  }
}
```

```json theme={"system"}
{
  "input": {
    "domains": ["example.com", "example.co.uk"]
  }
}
```

> [accordion] Example response
>
> ```json theme={"system"}
> {
>   "data": {
>     "setAutoJoinDomains": {
>       "workspace": {
>         "autoJoinDomains": ["example.co.uk", "example.com"]
>       }
>     }
>   }
> }
> ```

`Workspace.autoJoinDomains` returns the domains in lowercase, sorted.

## Errors

These are the cases specific to users. For the error format and the codes every area shares, see [Errors](https://docs.paradime.io/developers/graphql-api/admin-api/conventions.md#errors).

| Code | When |
| - | - |
| `CONFLICT` | `createUser` names an email that a member, a former member, or a pending invitation has. `updateUser` names a deactivated user, or a user whose role an API key can't change. |
| `NOT_FOUND` | No current or former member of the workspace has the `uid`. |
| `VALIDATION_FAILED` | The email or a domain is not valid, or the role is one an API key can't give. `extensions.field` gives the input path, such as `["input", "domains", "1"]`. |
| `RATE_LIMITED` | An invitation to the same email was sent less than a minute ago. |

## Related

* [Python SDK: Users](https://docs.paradime.io/developers/python-sdk/modules/admin/users.md): the same operations in `paradime.admin.users`.
* [Paradime CLI: `paradime admin`](https://docs.paradime.io/developers/paradime-cli/admin-cli): `paradime admin users`.
* [Invite users](https://docs.paradime.io/products/settings/users/invite-users.md), [Manage users](https://docs.paradime.io/products/settings/users/manage-users.md), and [Enable auto-join](https://docs.paradime.io/products/settings/users/enable-auto-join.md): the same tasks in Paradime.
* [Standard roles and permissions](https://docs.paradime.io/products/settings/users/roles-and-permissions.md) and [Role-based access control](https://docs.paradime.io/products/settings/users/role-based-access-control.md): what each role can do.


## Related topics

- [Administration API: Workspaces](https://docs.paradime.io/developers/graphql-api/admin-api/workspaces.md)
- [Administration API](https://docs.paradime.io/developers/graphql-api/admin-api/index.md)
- [Administration API: Conventions](https://docs.paradime.io/developers/graphql-api/admin-api/conventions.md)
- [Administration API: Integrations](https://docs.paradime.io/developers/graphql-api/admin-api/integrations.md)
- [Administration API: Notifications](https://docs.paradime.io/developers/graphql-api/admin-api/notifications.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.