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

# Users

> Create, list, update, and remove account users programmatically using the Arize TypeScript SDK.

<Note>
  The `users` functions are currently in **BETA**. The API may change without notice. A one-time warning is emitted on first use.
</Note>

## List Users

Results are sorted by creation date ascending (oldest first). Requires account admin role, member role, or `USER_READ` permission.

```typescript theme={null}
import { listUsers } from "@arizeai/ax-client";

const { data: users, pagination } = await listUsers({
  email: "example.com",         // optional case-insensitive partial match
  status: ["active", "invited"], // optional array of user statuses
  limit: 50,
});
```

## Create a User

Create a new account user with explicit invite control. Idempotent on `email` when `inviteMode !== "none"`. Requires account admin role or `USER_CREATE` permission.

```typescript theme={null}
import { createUser } from "@arizeai/ax-client";

const user = await createUser({
  name: "Jane Smith",
  email: "jane.smith@example.com",
  role: { type: "predefined", name: "member" },
  inviteMode: "email_link",  // "none" | "email_link" | "temporary_password"
});
```

### Invite Modes

| Mode                 | Behavior                                                                               |
| -------------------- | -------------------------------------------------------------------------------------- |
| `none`               | Pre-provision the user directly (no invitation email). For SSO-only accounts.          |
| `email_link`         | Send a verification link via email.                                                    |
| `temporary_password` | Issue a one-time password returned in the response. User must reset it on first login. |

## Get a User

Requires account admin role, member role, or `USER_READ` permission.

```typescript theme={null}
import { getUser } from "@arizeai/ax-client";

const user = await getUser({ userId: "your_user_id" });
```

## Update a User

Update the display name and/or developer permission. At least one of `name` or `isDeveloper` must be provided. Requires account admin role or `USER_UPDATE` permission.

```typescript theme={null}
import { updateUser } from "@arizeai/ax-client";

const user = await updateUser({
  userId: "your_user_id",
  name: "Jane Smith Updated",
  isDeveloper: true,
});
```

## Delete a User

Permanently blocks the user from the account (sets status to `inactive`, a terminal state). Cascades to organization memberships, space memberships, API keys, and role bindings. Blocked users cannot be re-invited. Callers cannot delete themselves. Requires account admin role or `USER_DELETE` permission.

```typescript theme={null}
import { deleteUser } from "@arizeai/ax-client";

await deleteUser({ userId: "your_user_id" });
```

## Bulk Delete Users

Delete multiple users by ID and/or email. This is a client-side orchestration helper — it resolves each email to a user ID, then issues a DELETE for every resolved ID. Individual failures are returned in the result array rather than thrown, so callers can inspect which deletions succeeded. Requires account admin role or `USER_DELETE` permission.

```typescript theme={null}
import { bulkDeleteUsers } from "@arizeai/ax-client";

const results = await bulkDeleteUsers({
  userIds: ["your_user_id_1"],            // optional
  emails: ["alice@example.com", "bob@example.com"],  // optional
});
for (const r of results) {
  console.log(r.userId, r.status, r.error ?? "");
}
```

## Resend Invitation

Regenerate the verification token and resend the invitation email. The target user must be in the `invited` state. Returns 400 if the user has already verified their account or if SAML/IdP login is enforced. Requires account admin role or `USER_CREATE` permission.

```typescript theme={null}
import { resendInvitation } from "@arizeai/ax-client";

await resendInvitation({ userId: "your_user_id" });
```

## Reset Password

Trigger a password-reset email for a user. Generates a reset token and sends an email with a 30-minute link. Returns 400 if the user authenticates via SSO/SAML or has not yet verified their account. Requires account admin role or `USER_UPDATE` permission.

```typescript theme={null}
import { resetPassword } from "@arizeai/ax-client";

await resetPassword({ userId: "your_user_id" });
```
