Clerk Users API
The user object represents a user that has successfully signed up to your application.
Operations 35
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
“How do I list every user in my Clerk instance, newest first?”
“Can I filter the user list by email address, username or organization?”
Tell an agent
List users whose email address matches {email_address}.
Show the users in organization {organization_id}, {limit} at a time.
Ask an LLM
“How do I create a user account from my backend without a sign-up flow?”
“Can I import a user with an existing password hash when migrating?”
Tell an agent
Create a user with email {email_address} and password {password}.
Create user {first_name} {last_name} with username {username}.
Ask an LLM
“How many users are signed up in my application?”
“What is the total number of banned users right now?”
Tell an agent
Count the users in organization {organization_id}.
Give me the total number of users matching {query}.
Ask an LLM
“How do I look up the full profile of one user by their ID?”
“What details come back for a single user record?”
Tell an agent
Fetch the details of user {user_id}.
Show me everything stored on user {user_id}.
Ask an LLM
“How do I change a user's name or username from the backend?”
“Can I switch which verified email is a user's primary email?”
Tell an agent
Change the username of user {user_id} to {username}.
Set email {primary_email_address_id} as the primary email for user {user_id}.
Ask an LLM
“How do I permanently remove a user account through the backend API?”
“Can I delete a user who asked for their account to be erased?”
Tell an agent destructive · confirm first
Delete user {user_id}.
Permanently remove the account of user {user_id} from my instance.
Ask an LLM
“How do I ban one abusive user so they can never sign in again?”
“Does banning a user revoke their active sessions?”
Tell an agent destructive · confirm first
Ban user {user_id}.
Block user {user_id} from signing in and revoke their sessions.
Ask an LLM
“How do I lift the ban on one user I banned by mistake?”
“Can a banned user be allowed to sign in again?”
Tell an agent
Unban user {user_id}.
Remove the ban mark from user {user_id}.
Ask an LLM
“How do I ban a whole batch of spam accounts in one request?”
“Can I ban several users together instead of one at a time?”
Tell an agent destructive · confirm first
Ban all of these users at once: {user_ids}.
Bulk ban the accounts {user_ids} and revoke their sessions.
Ask an LLM
“How do I lift bans on many users in a single call?”
“Can I bulk unban accounts I banned in a batch?”
Tell an agent
Unban all of these users at once: {user_ids}.
Bulk remove the ban from accounts {user_ids}.
Ask an LLM
“How do I temporarily lock a user out until the lock expires?”
“Where is the lock duration for locked users configured?”
Tell an agent
Lock user {user_id}.
Temporarily stop user {user_id} from signing in with a lock.
Ask an LLM
“How do I unlock a user before their lock expires?”
“Can I clear a lock on a user account manually?”
Tell an agent
Unlock user {user_id}.
Remove the sign-in lock from user {user_id} now.
Ask an LLM
“How do I upload a profile picture for a user from the backend?”
“Can I replace a user's avatar with a new image file?”
Tell an agent
Upload {file} as the profile image for user {user_id}.
Replace the avatar of user {user_id}.
Ask an LLM
“How do I remove an inappropriate profile picture from a user?”
“Can an admin clear a user's avatar back to the default?”
Tell an agent destructive · confirm first
Delete the profile image of user {user_id}.
Clear the avatar on user {user_id}.
Ask an LLM
“How do I add a key to a user's private metadata without overwriting the rest?”
“Does updating user metadata deep-merge nested objects?”
Tell an agent
Merge {private_metadata} into the private metadata of user {user_id}.
Deep-merge {public_metadata} into user {user_id}'s public metadata.
GET
/users/{user_id}/billing/subscription
Get a user's billing subscription · Retrieve a User's Billing Subscription
#
Ask an LLM
“Which plans is a given user currently subscribed to?”
“How do I check a user's subscription payment status?”
Tell an agent
Show the billing subscription for user {user_id}.
Get the active plans and payment status of user {user_id}.
GET
/users/{user_id}/billing/credits
Get a user's credit balance · Retrieve a User's Credit Balance
#
Ask an LLM
“How much billing credit does a user have left?”
“Can I see a user's credit balance before their next recurring charge?”
Tell an agent
Show the credit balance of user {user_id}.
Look up how many credits user {user_id} has available right now.
POST
/users/{user_id}/billing/credits
Adjust a user's credit balance · Adjust a User's Credit Balance
#
Ask an LLM
“How do I give a user billing credit as a goodwill gesture?”
“Can I decrease a user's credits, and how are duplicate adjustments prevented?”
Tell an agent
Increase user {user_id}'s credits by {amount} with idempotency key {idempotency_key}.
Apply a {action} of {amount} to user {user_id}'s credit balance with note {note} and key {idempotency_key}.
GET
/users/{user_id}/oauth_access_tokens/{provider}
Get a user's OAuth provider token · Retrieve the OAuth Access Token of a User
#
Ask an LLM
“How do I get the social provider access token for a user who signed in that way?”
“Are expired OAuth access tokens refreshed automatically when I fetch them?”
Tell an agent
Get the {provider} OAuth access token for user {user_id}.
Fetch user {user_id}'s access token from provider {provider} so I can call that provider's API.
GET
/users/{user_id}/organization_memberships
List a user's organization memberships · Retrieve All Memberships for a User
#
Ask an LLM
“Which organizations does a particular user belong to?”
“How do I page through all of one user's memberships?”
Tell an agent
List the organization memberships of user {user_id}.
Show which organizations user {user_id} is a member of.
GET
/users/{user_id}/organization_invitations
List a user's organization invitations · Retrieve All Invitations for a User
#
Ask an LLM
“What organization invitations has a particular user received?”
“Can I see only the pending invitations for one user?”
Tell an agent
List the organization invitations sent to user {user_id}.
Show user {user_id}'s organization invitations with status {status}.
Ask an LLM
“How do I confirm a user's password in a custom re-verification step?”
“Can my backend check whether a supplied password matches the user's?”
Tell an agent
Check whether {password} is the correct password for user {user_id}.
Verify user {user_id}'s password before this sensitive action.
POST
/users/{user_id}/verify_totp
Verify a user's TOTP or backup code · Verify a TOTP or Backup Code for a User
#
Ask an LLM
“How do I verify an authenticator app code for a user in a custom flow?”
“Does verifying a backup code use it up?”
Tell an agent
Verify the code {code} for user {user_id}.
Check whether authenticator or backup code {code} is valid for user {user_id}.
Ask an LLM
“How do I turn off two-factor authentication for a user who lost their phone?”
“Can I disable SMS and authenticator MFA for a user in one step?”
Tell an agent destructive · confirm first
Disable every MFA method on user {user_id}.
Turn off two-factor authentication for user {user_id}.
DELETE
/users/{user_id}/backup_code
Disable a user's backup codes · Disable All User's Backup Codes
#
Ask an LLM
“How do I invalidate all of a user's backup codes?”
“Can an admin revoke leaked recovery codes for a user?”
Tell an agent destructive · confirm first
Disable all backup codes for user {user_id}.
Invalidate the recovery codes of user {user_id}.
DELETE
/users/{user_id}/passkeys/{passkey_identification_id}
Delete a user's passkey · Delete a User Passkey
#
Ask an LLM
“How do I remove a passkey registered by a user?”
“Is the user notified by email when an admin deletes their passkey?”
Tell an agent destructive · confirm first
Delete passkey {passkey_identification_id} from user {user_id}.
Remove the passkey {passkey_identification_id} that user {user_id} registered.
DELETE
/users/{user_id}/web3_wallets/{web3_wallet_identification_id}
Delete a user's Web3 wallet · Delete a User Web3 Wallet
#
Ask an LLM
“How do I unlink a crypto wallet from a user account?”
“Can I delete a Web3 wallet identification from a user?”
Tell an agent destructive · confirm first
Delete Web3 wallet {web3_wallet_identification_id} from user {user_id}.
Unlink wallet {web3_wallet_identification_id} from the account of user {user_id}.
Ask an LLM
“How do I remove the authenticator app (TOTP) setup from a user?”
“Can I wipe every TOTP a user has enrolled?”
Tell an agent destructive · confirm first
Delete all TOTPs for user {user_id}.
Remove the authenticator app enrollment from user {user_id}.
DELETE
/users/{user_id}/external_accounts/{external_account_id}
Unlink a user's external account · Delete External Account
#
Ask an LLM
“How do I disconnect a social login account from a user?”
“Can I delete one linked external account by its ID?”
Tell an agent destructive · confirm first
Delete external account {external_account_id} from user {user_id}.
Unlink the social connection {external_account_id} on user {user_id}.
POST
/users/{user_id}/password/set_compromised
Flag a user's password as compromised · Set a User's Password as Compromised
#
Ask an LLM
“How do I force a user to reset a leaked password on next sign-in?”
“Can I also revoke all sessions when marking a password compromised?”
Tell an agent
Mark the password of user {user_id} as compromised.
Flag user {user_id}'s password as compromised and set revoke all sessions to {revoke_all_sessions}.
POST
/users/{user_id}/password/unset_compromised
Clear a compromised-password flag · Unset a User's Password as Compromised
#
Ask an LLM
“How do I stop prompting a user to reset a password I flagged by mistake?”
“Can I undo marking a password as compromised?”
Tell an agent
Unmark the password of user {user_id} as compromised.
Clear the compromised-password flag on user {user_id}.
GET
/platform/applications/{applicationID}/instances/{envOrInsID}/users
List users of an application instance · List Instance Users
#
Ask an LLM
“How do I list the users of one of my applications' production instance via the Platform API?”
“Can I search an instance's users by email or username across applications I manage?”
Tell an agent
List the users of application {applicationID} in environment {envOrInsID}.
Search instance {envOrInsID} of application {applicationID} for users matching {query}.
DELETE
/platform/applications/{applicationID}/instances/{envOrInsID}/users/{userID}
Delete a user in an application instance · Delete a User
#
Ask an LLM
“How do I delete a user from a specific application instance through the Platform API?”
“What happens if I delete a platform instance user that was already removed?”
Tell an agent destructive · confirm first
Delete user {userID} from application {applicationID} instance {envOrInsID}.
Remove user {userID} in the {envOrInsID} environment of app {applicationID} via the platform.
POST
/platform/applications/{applicationID}/instances/{envOrInsID}/users/{userID}/ban
Ban a user in an application instance · Ban a User
#
Ask an LLM
“How do I ban a user in one of my applications using a Platform API token?”
“Which scope is needed to ban users through the Platform API?”
Tell an agent destructive · confirm first
Ban user {userID} in application {applicationID} instance {envOrInsID}.
Using the platform, block user {userID} from signing into the {envOrInsID} environment of app {applicationID}.
POST
/platform/applications/{applicationID}/instances/{envOrInsID}/users/{userID}/unban
Unban a user in an application instance · Unban a User
#
Ask an LLM
“How do I lift a ban on a user in one of my applications through the Platform API?”
“Can a platform-banned user sign in again after being unbanned?”
Tell an agent
Unban user {userID} in application {applicationID} instance {envOrInsID}.
Using the platform, let user {userID} sign back into the {envOrInsID} environment of app {applicationID}.
Documentation
📖
Documentation
https://clerk.com/docs/reference/backend-api
📖
APIReference
https://clerk.com/docs/reference/backend-api
📖
GettingStarted
https://clerk.com/docs/quickstarts/overview
📖
Authentication
https://clerk.com/docs/backend-requests/making/jwt-templates
📖
Documentation
https://clerk.com/docs
📖
Documentation
https://clerk.com/docs/webhooks/overview