Skip to main content

Users & account

Manage users, their roles, and password resets (v2 manager API), and read the current user and the accounts they can access. Available as mgr.users / mgr.me (TypeScript), mgr.Users / mgr.Me (Go), and mgr.users / mgr.me (Rust).

List, create, enable/disable, delete

for await (const user of mgr.users.list()) console.log(user.email);
const all = await mgr.users.listAll({ email: "@acme.com" });

await mgr.users.create({ email: "new.user@acme.com", roles: [] });
await mgr.users.enable(["new.user@acme.com"]);
await mgr.users.disable(["old.user@acme.com"]);
await mgr.users.delete(["old.user@acme.com"]);
note

The list-users endpoint exposes no page parameter, so there is nothing to auto-paginate: every SDK issues a single fetch and returns the response as served (the TypeScript async iterator and the Go iter.Seq2 simply yield that one page's items).

Roles

List the assignable role names, and grant or revoke roles for users by email.

const roles = await mgr.users.listRoles();
await mgr.users.addRoles(["agent@acme.com"], ["agent"]);
await mgr.users.removeRoles(["agent@acme.com"], ["supervisor"]);

Password resets

Trigger a password-reset email for one or more users:

await mgr.users.resetPasswords(["user@acme.com"]);

The current user (me)

The me namespace describes the authenticated principal — useful for "who am I" checks, listing the accounts a token can reach, and self-service password reset.

const { item: user } = await mgr.me.get();
const accounts = await mgr.me.accounts();
await mgr.me.resetPassword();

Manager-side user lookups

The users resource also exposes the manager-side current principal (me) and a lookup by email.

const me = await mgr.users.me();
const user = await mgr.users.getByEmail("agent@example.com");

Reference