Appwrite Users API
The Users service allows you to manage your project users. 45 operations across 35 paths in the Appwrite 2.0.0 OpenAPI.
Operations 45
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“Who are all the users registered in my project?”
“Can I search users by name or email and filter with queries?”
Tell an agent
List every user in this project.
Search project users for {search}.
Ask an LLM
“How do I add a new user to my project from the server side?”
“Can I create a user with only a phone number and no email?”
Tell an agent
Create user {userId} with email {email} and password {password}.
Add user {userId} named {name} with phone {phone}.
POST
/users/argon2
Import a user with an Argon2-hashed password · Create user with Argon2 password
#
Ask an LLM
“How do I import a user whose password is already hashed with Argon2?”
“Can migrated users keep their Argon2 password hashes so they don't need to reset?”
Tell an agent
Create user {userId} with email {email} and Argon2 hash {password}.
Import {name} as user {userId}, email {email}, Argon2 password hash {password}.
Ask an LLM
“Can I bring over users whose passwords are stored as bcrypt hashes?”
“How do I create a user from an existing bcrypt password hash?”
Tell an agent
Create user {userId} with email {email} and bcrypt hash {password}.
Import {name} as {userId} ({email}) keeping the bcrypt password {password}.
Ask an LLM
“Which OAuth identities are linked to users in my project?”
“Can I search linked login identities across every user?”
Tell an agent
List all linked user identities.
Search user identities for {search}.
Ask an LLM
“How do I disconnect a social login identity from a user?”
“Can I delete one linked identity without deleting the user?”
Tell an agent destructive · confirm first
Delete identity {identityId}.
Unlink the OAuth identity {identityId} from its user.
Ask an LLM
“How do I import legacy users whose passwords are MD5 hashes?”
“Can I create a user from an MD5 password hash?”
Tell an agent
Create user {userId} with email {email} and MD5 hash {password}.
Import {name} as {userId} ({email}) with MD5 password {password}.
Ask an LLM
“Can I migrate users from a PHP app whose passwords are PHPass hashes?”
“How do I create a user from a PHPass password hash?”
Tell an agent
Create user {userId} with email {email} and PHPass hash {password}.
Import {name} as {userId} ({email}) keeping PHPass password {password}.
Ask an LLM
“How do I import a user whose password is hashed with standard Scrypt?”
“Which Scrypt parameters (salt, CPU, memory, parallel, length) must I pass when importing a user?”
Tell an agent
Create {userId} ({email}), Scrypt hash {password}, salt {passwordSalt}, cpu {passwordCpu}, mem {passwordMemory}, par {passwordParallel}, len {passwordLength}.
Import Scrypt user {userId}: {email}, hash {password}, salt {passwordSalt}, N {passwordCpu}, r {passwordMemory}, p {passwordParallel}, len {passwordLength}.
POST
/users/scrypt-modified
Import a user with a Scrypt Modified password hash · Create user with Scrypt modified password
#
Ask an LLM
“Can I import users exported with the Scrypt Modified hash variant that uses a signer key?”
“What salt separator and signer key do I need for a Scrypt Modified user import?”
Tell an agent
Create user {userId} ({email}) with Scrypt Modified hash {password}, salt {passwordSalt}, separator {passwordSaltSeparator}, signer key {passwordSignerKey}.
Import {name} as {userId}, {email}, modified-scrypt {password} with {passwordSalt}/{passwordSaltSeparator}/{passwordSignerKey}.
Ask an LLM
“How do I import a user whose password is a SHA hash?”
“Can I specify which SHA version the imported password hash uses?”
Tell an agent
Create user {userId} with email {email} and SHA hash {password}.
Import {userId} ({email}) with {passwordVersion} password hash {password}.
Ask an LLM
“How many users and sessions does my project have, and how has that grown?”
“Can I see user sign-up trends over the last 30 days?”
Tell an agent
Show user usage stats for the last {range}.
Report total users and sessions for this project.
Ask an LLM
“How do I look up one user's profile by their ID?”
“What does a single user record include, like email and verification status?”
Tell an agent
Show user {userId}.
Fetch the account details for user {userId}.
Ask an LLM
“What happens to a user's ID after I delete them — can it be reused?”
“Once a user is deleted, do their documents and files get removed too?”
Tell an agent destructive · confirm first
Delete user {userId}.
Permanently remove user {userId} and release their ID.
Ask an LLM
“How do I change the email address on a user's account as an admin?”
“Can I update a user's email from the server?”
Tell an agent
Change user {userId}'s email to {email}.
Set the email address of {userId} to {email}.
PATCH
/users/{userId}/impersonator
Allow or block a user impersonating others · Update user impersonator capability
#
Ask an LLM
“How do I let a support agent act as another user for debugging?”
“When a user impersonates someone, whose name shows in the audit logs?”
Tell an agent
Set impersonation capability for user {userId} to {impersonator}.
Turn impersonator access {impersonator} for {userId}.
Ask an LLM
“How can my server get a JWT to call the API on behalf of a user?”
“Can I set how long a user's JWT stays valid, or tie it to a specific session?”
Tell an agent
Create a JWT for user {userId}.
Issue a JWT for {userId} tied to session {sessionId} lasting {duration} seconds.
Ask an LLM
“How do I tag a user with labels like admin or premium to grant access to resources?”
“Does setting labels replace a user's existing labels?”
Tell an agent
Set user {userId}'s labels to {labels}.
Replace the labels on {userId} with {labels}.
Ask an LLM
“What has a particular user been doing recently in my project?”
“Can I see a user's login and activity history?”
Tell an agent
Show the activity logs for user {userId}.
List logs for {userId} matching {queries}.
Ask an LLM
“Which teams is a given user a member of?”
“Can I search a user's team memberships?”
Tell an agent
List team memberships for user {userId}.
Search {userId}'s memberships for {search}.
Ask an LLM
“How do I enforce multi-factor authentication on a specific user's account?”
“Can an admin disable MFA for a user who is locked out?”
Tell an agent
Set MFA to {mfa} for user {userId}.
Enable or disable two-factor on {userId} with value {mfa}.
DELETE
/users/{userId}/mfa/authenticators/{type}
Remove a user's authenticator app · Delete authenticator
#
Ask an LLM
“A user lost their phone; how do I remove their TOTP authenticator app?”
“Can I delete one MFA authenticator type from a user's account?”
Tell an agent destructive · confirm first
Delete the {type} authenticator for user {userId}.
Remove authenticator app {type} from {userId}.
GET
/users/{userId}/mfa/challenges/{challengeId}
Get a user's custom MFA challenge code · Get MFA challenge
#
Ask an LLM
“How do I retrieve an MFA challenge code so I can deliver it through my own SMS or email channel?”
“Can my server read the code of a pending MFA challenge?”
Tell an agent
Get MFA challenge {challengeId} for user {userId}.
Fetch the code for challenge {challengeId} of {userId} so I can send it myself.
Ask an LLM
“Which second factors (TOTP, email, phone) can a user use for MFA?”
“Has a user set up an authenticator app yet?”
Tell an agent
List the MFA factors for user {userId}.
Show which two-factor methods {userId} has available.
Ask an LLM
“How can an admin view a user's existing MFA backup codes?”
“Do recovery codes need to be generated before I can read them?”
Tell an agent
Show the MFA recovery codes for user {userId}.
Read {userId}'s current backup codes.
PUT
/users/{userId}/mfa/recovery-codes
Regenerate a user's MFA recovery codes · Update MFA recovery codes (regenerate)
#
Ask an LLM
“A user's backup codes leaked; how do I issue them a fresh set?”
“Does regenerating recovery codes invalidate the old ones?”
Tell an agent
Regenerate MFA recovery codes for user {userId}.
Replace {userId}'s existing backup codes with a new set.
PATCH
/users/{userId}/mfa/recovery-codes
Generate a user's first MFA recovery codes · Create MFA recovery codes
#
Ask an LLM
“How do I generate MFA recovery codes for a user for the first time?”
“Can recovery codes be used as a verification type during an MFA challenge?”
Tell an agent
Create initial MFA recovery codes for user {userId}.
Generate backup codes for {userId}, who has none yet.
Ask an LLM
“How do I update a user's display name from the server?”
“Can I fix a typo in someone's name on their account?”
Tell an agent
Rename user {userId} to {name}.
Set the display name of {userId} to {name}.
Ask an LLM
“How can an admin set a new password for a user?”
“Can I force-change a user's password without them knowing the old one?”
Tell an agent
Set user {userId}'s password to {password}.
Reset the password for {userId} to {password}.
Ask an LLM
“How do I update the phone number on a user's account?”
“Can I change a user's phone from the server side?”
Tell an agent
Change user {userId}'s phone number to {number}.
Set {userId}'s phone to {number}.
Ask an LLM
“What preferences, like theme or language, has a user saved?”
“How do I read the custom prefs object stored on a user?”
Tell an agent
Show preferences for user {userId}.
Read the stored prefs of {userId}.
Ask an LLM
“Does updating user preferences merge with the old values or replace them entirely?”
“What is the maximum size of a user's preferences object?”
Tell an agent
Set user {userId}'s preferences to {prefs}.
Overwrite the prefs of {userId} with {prefs}.
Ask an LLM
“On which devices is a user currently logged in?”
“How many active sessions does a particular user have?”
Tell an agent
List sessions for user {userId}.
Show where {userId} is signed in.
Ask an LLM
“How can my server sign a user in and get an immediately usable session?”
“Can I create a session for a user without their password?”
Tell an agent
Create a session for user {userId}.
Log {userId} in server-side and return the session.
Ask an LLM
“How do I log a user out of all devices at once?”
“Can I revoke every session a user has after a password leak?”
Tell an agent destructive · confirm first
Delete all sessions for user {userId}.
Sign {userId} out everywhere.
Ask an LLM
“How do I end just one of a user's sessions, like a lost laptop?”
“Can I revoke a single session by its ID while keeping the others?”
Tell an agent destructive · confirm first
Delete session {sessionId} for user {userId}.
Log {userId} out of session {sessionId} only.
Ask an LLM
“How do I block a user from signing in without deleting them?”
“Can I re-enable a user I previously blocked?”
Tell an agent
Set user {userId}'s status to {status}.
Block or unblock {userId} by setting status {status}.
Ask an LLM
“Which email addresses, phones or push devices can I message a user on?”
“Can I filter a user's messaging targets with queries?”
Tell an agent
List messaging targets for user {userId}.
Show {userId}'s targets matching {queries}.
Ask an LLM
“How do I register a new email, SMS or push destination for a user?”
“Can I tie a user's messaging target to a specific provider?”
Tell an agent
Add a {providerType} target {targetId} for user {userId} at {identifier}.
Create target {targetId} named {name} on {userId}: {providerType} {identifier} via provider {providerId}.
Ask an LLM
“What are the details of a specific push or email target on a user?”
“How do I look up a single user target by its ID?”
Tell an agent
Show target {targetId} of user {userId}.
Get messaging target {targetId} for {userId}.
Ask an LLM
“Can I change the address or provider on an existing user target?”
“How do I rename a messaging target I already created for a user?”
Tell an agent
Change target {targetId} of user {userId} to identifier {identifier}.
Rename {userId}'s existing target {targetId} to {name} and route it via provider {providerId}.
Ask an LLM
“How do I stop messaging a user at an old phone number or device?”
“Can I delete one messaging target from a user?”
Tell an agent destructive · confirm first
Delete target {targetId} from user {userId}.
Remove messaging destination {targetId} on {userId}.
Ask an LLM
“How do I generate a secret token my client can exchange for a session in a custom login flow?”
“Can I set the length and expiry of a user's login token?”
Tell an agent
Create a session token for user {userId}.
Issue a {length}-character token for {userId} that expires in {expire} seconds.
PATCH
/users/{userId}/verification
Mark a user's email as verified or not · Update email verification
#
Ask an LLM
“How do I manually mark a user's email address as verified?”
“Can an admin reset the email verification flag on an account?”
Tell an agent
Set email verification for user {userId} to {emailVerification}.
Mark {userId}'s email address verified: {emailVerification}.
PATCH
/users/{userId}/verification/phone
Mark a user's phone as verified or not · Update phone verification
#
Ask an LLM
“How do I manually mark a user's phone number as verified?”
“Can I unverify a user's phone after they change numbers?”
Tell an agent
Set phone verification for user {userId} to {phoneVerification}.
Mark {userId}'s phone number verified: {phoneVerification}.
Documentation
Specifications
SDKs
Other Resources
🔗
Overlay
https://raw.githubusercontent.com/api-evangelist/appwrite/refs/heads/main/overlays/appwrite-users-overlay.yaml
🔗
PostmanCollection
https://raw.githubusercontent.com/api-evangelist/appwrite/refs/heads/main/postman/appwrite-users-api.postman_collection.json
🔗
OpenCollection
https://raw.githubusercontent.com/api-evangelist/appwrite/refs/heads/main/collections/appwrite-users-api.opencollection.json