Users
- Written for
- + Written for
- Deprecated
- + Deprecated
- Applies to
- + Applies to
Users
Backend API — secret key (Authorization: Bearer sk_…).
24 routes. Each row is one endpoint with its explanation, required scope, and whether it honours the Idempotency-Key header.
Method & path | Scope | Idem | Explanation |
|---|---|---|---|
|
| List users, cursor-paginated. | |
|
| Fetch a single user. Never includes private_metadata. | |
|
| ✓ | Update a user profile or metadata. |
|
| ✓ | Ban a user and revoke every session. |
|
| ✓ | Soft-delete a user; PII is scrubbed after 30 days. |
|
| ✓ | Create a user from an email and optional password, name and metadata. Emits user.created. |
|
| ✓ | Lift a ban. Sessions are not restored. |
|
| ✓ | Lock an account so it cannot sign in, for an optional duration (default one year). |
|
| ✓ | Clear a lockout so the account can sign in again. |
|
| ✓ | Remove every second factor and its recovery codes. |
|
| ✓ | Remove one second factor. The last factor removed also turns MFA off. |
|
| ✓ | Replace the metadata bags wholesale. Each bag present overwrites the stored one. |
|
| List a user's active sessions. | |
|
| ✓ | Revoke every session a user holds and bump sessions_version. |
|
| ✓ | Add an email address to a user. Starts unverified. |
|
| ✓ | Mark an address verified on the backend authority, no code round-trip. |
|
| ✓ | Make a verified address primary. Unverified addresses are refused. |
|
| List a user's linked identities: their Atlas email/password identity plus each linked external/OAuth provider account. No tokens. | |
|
| Backend-initiated connect: start an OAuth flow that links a NEW provider identity to this user (the caller supplies the user id). Returns an authorization_url to redirect the browser to; the callback links the provider without minting a session. Refuses an identity already owned by another user (IDENTITY_ALREADY_LINKED). | |
|
| ✓ | Merge a secondary user into this primary: moves the secondary's provider accounts and verified identifiers over (skipping collisions), re-points org memberships without escalating role, revokes the secondary's sessions and retires it. Never clears the primary's MFA or ban. |
|
| ✓ | Unlink a provider identity, extracting it into a new standalone user (Auth0 semantics). The sole/primary identity cannot be unlinked. |
|
| List the OAuth clients a user has authorized, with the granted scopes and grant time. Never returns tokens. | |
|
| ✓ | Revoke every consent grant a user holds and cascade-revoke all associated tokens through the standard revocation path. |
|
| Fetch a stored provider token, refreshing it single-flight if stale. |