AACFlow

Clerk

Manage users, organizations, and sessions in Clerk

Usage Instructions

Integrate Clerk authentication and user management into your workflow. Create, update, delete, and list users. Manage organizations and their memberships. Monitor and control user sessions.

Tools

clerk_list_users

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
limitnumberNoNo description
offsetnumberNoNo description
orderBystringNoNo description
emailAddressstringNoFilter by email address (e.g., user@example.com or user1@example.com,user2@example.com)
phoneNumberstringNoNo description
externalIdstringNoNo description
usernamestringNoNo description
userIdstringNoFilter by user ID (e.g., user_2NNEqL2nrIRdJ194ndJqAHwEfxC or comma-separated for multiple)
querystringNoSearch query to match across email, phone, username, and names (e.g., john or john@example.com)

Output

ParameterTypeDescription
usersarrayArray of Clerk user objects
idstringUser ID
usernamestringUsername
firstNamestringFirst name
lastNamestringLast name
imageUrlstringProfile image URL
hasImagebooleanWhether user has a profile image
primaryEmailAddressIdstringPrimary email address ID
primaryPhoneNumberIdstringPrimary phone number ID
emailAddressesarrayUser email addresses
idstringEmail address ID
emailAddressstringEmail address
phoneNumbersarrayUser phone numbers
idstringPhone number ID
phoneNumberstringPhone number
externalIdstringExternal system ID
passwordEnabledbooleanWhether password is enabled
twoFactorEnabledbooleanWhether 2FA is enabled
bannedbooleanWhether user is banned
lockedbooleanWhether user is locked
lastSignInAtnumberLast sign-in timestamp
lastActiveAtnumberLast activity timestamp
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
publicMetadatajsonPublic metadata
totalCountnumberTotal number of users matching the query
successbooleanOperation success status

clerk_get_user

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
userIdstringYesNo description

Output

ParameterTypeDescription
idstringUser ID
usernamestringUsername
firstNamestringFirst name
lastNamestringLast name
imageUrlstringProfile image URL
hasImagebooleanWhether user has a profile image
primaryEmailAddressIdstringPrimary email address ID
primaryPhoneNumberIdstringPrimary phone number ID
primaryWeb3WalletIdstringPrimary Web3 wallet ID
emailAddressesarrayUser email addresses
idstringEmail address ID
emailAddressstringEmail address
verifiedbooleanWhether email is verified
phoneNumbersarrayUser phone numbers
idstringPhone number ID
phoneNumberstringPhone number
verifiedbooleanWhether phone is verified
externalIdstringExternal system ID
passwordEnabledbooleanWhether password is enabled
twoFactorEnabledbooleanWhether 2FA is enabled
totpEnabledbooleanWhether TOTP is enabled
backupCodeEnabledbooleanWhether backup codes are enabled
bannedbooleanWhether user is banned
lockedbooleanWhether user is locked
deleteSelfEnabledbooleanWhether user can delete themselves
createOrganizationEnabledbooleanWhether user can create organizations
lastSignInAtnumberLast sign-in timestamp
lastActiveAtnumberLast activity timestamp
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
publicMetadatajsonPublic metadata (readable from frontend)
privateMetadatajsonPrivate metadata (backend only)
unsafeMetadatajsonUnsafe metadata (modifiable from frontend)
successbooleanOperation success status

clerk_create_user

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
emailAddressstringNoNo description
phoneNumberstringNoNo description
usernamestringNoNo description
passwordstringNoNo description
firstNamestringNoNo description
lastNamestringNoNo description
externalIdstringNoNo description
publicMetadatajsonNoNo description
privateMetadatajsonNoNo description
unsafeMetadatajsonNoNo description
skipPasswordChecksbooleanNoNo description
skipPasswordRequirementbooleanNoNo description

Output

ParameterTypeDescription
idstringCreated user ID
usernamestringUsername
firstNamestringFirst name
lastNamestringLast name
imageUrlstringProfile image URL
primaryEmailAddressIdstringPrimary email address ID
primaryPhoneNumberIdstringPrimary phone number ID
emailAddressesarrayUser email addresses
idstringEmail address ID
emailAddressstringEmail address
verifiedbooleanWhether email is verified
phoneNumbersarrayUser phone numbers
idstringPhone number ID
phoneNumberstringPhone number
verifiedbooleanWhether phone is verified
externalIdstringExternal system ID
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
publicMetadatajsonPublic metadata
successbooleanOperation success status

clerk_update_user

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
userIdstringYesNo description
firstNamestringNoNo description
lastNamestringNoNo description
usernamestringNoNo description
passwordstringNoNo description
externalIdstringNoNo description
primaryEmailAddressIdstringNoNo description
primaryPhoneNumberIdstringNoNo description
publicMetadatajsonNoNo description
privateMetadatajsonNoNo description
unsafeMetadatajsonNoNo description
skipPasswordChecksbooleanNoNo description

Output

ParameterTypeDescription
idstringUpdated user ID
usernamestringUsername
firstNamestringFirst name
lastNamestringLast name
imageUrlstringProfile image URL
primaryEmailAddressIdstringPrimary email address ID
primaryPhoneNumberIdstringPrimary phone number ID
emailAddressesarrayUser email addresses
idstringEmail address ID
emailAddressstringEmail address
verifiedbooleanWhether email is verified
phoneNumbersarrayUser phone numbers
idstringPhone number ID
phoneNumberstringPhone number
verifiedbooleanWhether phone is verified
externalIdstringExternal system ID
bannedbooleanWhether user is banned
lockedbooleanWhether user is locked
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
publicMetadatajsonPublic metadata
successbooleanOperation success status

clerk_delete_user

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
userIdstringYesNo description

Output

ParameterTypeDescription
idstringDeleted user ID
objectstringObject type (user)
deletedbooleanWhether the user was deleted
successbooleanOperation success status

clerk_list_organizations

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
limitnumberNoNo description
offsetnumberNoNo description
includeMembersCountbooleanNoNo description
querystringNoNo description
orderBystringNoNo description

Output

ParameterTypeDescription
organizationsarrayArray of Clerk organization objects
idstringOrganization ID
namestringOrganization name
slugstringOrganization slug
imageUrlstringOrganization image URL
hasImagebooleanWhether organization has an image
membersCountnumberNumber of members
pendingInvitationsCountnumberNumber of pending invitations
maxAllowedMembershipsnumberMax allowed memberships
adminDeleteEnabledbooleanWhether admin delete is enabled
createdBystringCreator user ID
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
publicMetadatajsonPublic metadata
totalCountnumberTotal number of organizations
successbooleanOperation success status

clerk_get_organization

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
organizationIdstringYesThe ID or slug of the organization to retrieve (e.g., org_2NNEqL2nrIRdJ194ndJqAHwEfxC or my-org-slug)

Output

ParameterTypeDescription
idstringOrganization ID
namestringOrganization name
slugstringOrganization slug
imageUrlstringOrganization image URL
hasImagebooleanWhether organization has an image
membersCountnumberNumber of members
pendingInvitationsCountnumberNumber of pending invitations
maxAllowedMembershipsnumberMax allowed memberships
adminDeleteEnabledbooleanWhether admin delete is enabled
createdBystringCreator user ID
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
publicMetadatajsonPublic metadata
successbooleanOperation success status

clerk_create_organization

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
namestringYesNo description
createdBystringYesUser ID of the creator who will become admin (e.g., user_2NNEqL2nrIRdJ194ndJqAHwEfxC)
slugstringNoNo description
maxAllowedMembershipsnumberNoNo description
publicMetadatajsonNoNo description
privateMetadatajsonNoNo description

Output

ParameterTypeDescription
idstringCreated organization ID
namestringOrganization name
slugstringOrganization slug
imageUrlstringOrganization image URL
hasImagebooleanWhether organization has an image
membersCountnumberNumber of members
pendingInvitationsCountnumberNumber of pending invitations
maxAllowedMembershipsnumberMax allowed memberships
adminDeleteEnabledbooleanWhether admin delete is enabled
createdBystringCreator user ID
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
publicMetadatajsonPublic metadata
successbooleanOperation success status

clerk_list_sessions

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
userIdstringNoUser ID to list sessions for (e.g., user_2NNEqL2nrIRdJ194ndJqAHwEfxC; required if clientId not provided)
clientIdstringNoNo description
statusstringNoFilter by session status (abandoned, active, ended, expired, pending, removed, replaced, revoked)
limitnumberNoNo description
offsetnumberNoNo description

Output

ParameterTypeDescription
sessionsarrayArray of Clerk session objects
idstringSession ID
userIdstringUser ID
clientIdstringClient ID
statusstringSession status
lastActiveAtnumberLast activity timestamp
lastActiveOrganizationIdstringLast active organization ID
expireAtnumberExpiration timestamp
abandonAtnumberAbandon timestamp
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
totalCountnumberTotal number of sessions
successbooleanOperation success status

clerk_get_session

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
sessionIdstringYesNo description

Output

ParameterTypeDescription
idstringSession ID
userIdstringUser ID
clientIdstringClient ID
statusstringSession status
lastActiveAtnumberLast activity timestamp
lastActiveOrganizationIdstringLast active organization ID
expireAtnumberExpiration timestamp
abandonAtnumberAbandon timestamp
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
successbooleanOperation success status

clerk_revoke_session

Input

ParameterTypeRequiredDescription
secretKeystringYesNo description
sessionIdstringYesNo description

Output

ParameterTypeDescription
idstringSession ID
userIdstringUser ID
clientIdstringClient ID
statusstringSession status (should be revoked)
lastActiveAtnumberLast activity timestamp
lastActiveOrganizationIdstringLast active organization ID
expireAtnumberExpiration timestamp
abandonAtnumberAbandon timestamp
createdAtnumberCreation timestamp
updatedAtnumberLast update timestamp
successbooleanOperation success status

On this page

Start building today
Trusted by over 100,000 builders.
The SaaS platform to build AI agents and run your agentic workforce.
Get started