Clerk

Manage users, organizations, and sessions in Clerk

Clerk is a comprehensive identity infrastructure platform that helps you manage users, authentication, and sessions for your applications.

In Sim, the Clerk integration lets your agents automate user and session management through easy-to-use API-based tools. Agents can securely list users, update user profiles, manage organizations, monitor sessions, and revoke access directly in your workflow.

With Clerk, you can:

  • Authenticate users and manage sessions: Seamlessly control sign-in, sign-up, and session lifecycle for your users.
  • List and update users: Automatically pull user lists, update user attributes, or view profile details as part of your agent tasks.
  • Manage organizations and memberships: Add or update organizations and administer user memberships with clarity.
  • Monitor and revoke sessions: See active or past user sessions, and revoke access immediately if needed for security.

The integration enables real-time, auditable management of your user base—all from within Sim. Connected agents can automate onboarding, enforce policies, keep directories up to date, and react to authentication events or organizational changes, helping you run secure and flexible processes using Clerk as your identity engine.

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

List all users in your Clerk application with optional filtering and pagination

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
limitnumberNoNumber of results per page (1-500, default: 10)
offsetnumberNoNumber of results to skip for pagination
orderBystringNoSort field with optional +/- prefix for direction (default: -created_at)
emailAddressstringNoFilter by email address (comma-separated for multiple)
phoneNumberstringNoFilter by phone number (comma-separated for multiple)
externalIdstringNoFilter by external ID (comma-separated for multiple)
usernamestringNoFilter by username (comma-separated for multiple)
userIdstringNoFilter by user ID (comma-separated for multiple)
querystringNoSearch query to match across email, phone, username, and names

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

Retrieve a single user by their ID from Clerk

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
userIdstringYesThe ID of the user to retrieve

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

Create a new user in your Clerk application

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
emailAddressstringNoEmail addresses for the user (comma-separated for multiple)
phoneNumberstringNoPhone numbers for the user (comma-separated for multiple)
usernamestringNoUsername for the user (must be unique)
passwordstringNoPassword for the user (minimum 8 characters)
firstNamestringNoFirst name of the user
lastNamestringNoLast name of the user
externalIdstringNoExternal system identifier (must be unique)
publicMetadatajsonNoPublic metadata (JSON object, readable from frontend)
privateMetadatajsonNoPrivate metadata (JSON object, backend only)
unsafeMetadatajsonNoUnsafe metadata (JSON object, modifiable from frontend)
skipPasswordChecksbooleanNoSkip password validation checks
skipPasswordRequirementbooleanNoMake password optional

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

Update an existing user in your Clerk application

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
userIdstringYesThe ID of the user to update
firstNamestringNoFirst name of the user
lastNamestringNoLast name of the user
usernamestringNoUsername (must be unique)
passwordstringNoNew password (minimum 8 characters)
externalIdstringNoExternal system identifier
primaryEmailAddressIdstringNoID of verified email to set as primary
primaryPhoneNumberIdstringNoID of verified phone to set as primary
publicMetadatajsonNoPublic metadata (JSON object)
privateMetadatajsonNoPrivate metadata (JSON object)
unsafeMetadatajsonNoUnsafe metadata (JSON object)
skipPasswordChecksbooleanNoSkip password validation checks

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

Delete a user from your Clerk application

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
userIdstringYesThe ID of the user to delete

Output

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

clerk_list_organizations

List all organizations in your Clerk application with optional filtering

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
limitnumberNoNumber of results per page (1-500, default: 10)
offsetnumberNoNumber of results to skip for pagination
includeMembersCountbooleanNoInclude member count for each organization
querystringNoSearch by organization ID, name, or slug
orderBystringNoSort field (name, created_at, members_count) with +/- prefix

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

Retrieve a single organization by ID or slug from Clerk

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
organizationIdstringYesThe ID or slug of the organization to retrieve

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

Create a new organization in your Clerk application

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
namestringYesName of the organization
createdBystringYesUser ID of the creator (will become admin)
slugstringNoSlug identifier for the organization
maxAllowedMembershipsnumberNoMaximum member capacity (0 for unlimited)
publicMetadatajsonNoPublic metadata (JSON object)
privateMetadatajsonNoPrivate metadata (JSON object)

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

List sessions for a user or client in your Clerk application

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
userIdstringNoUser ID to list sessions for (required if clientId not provided)
clientIdstringNoClient ID to list sessions for (required if userId not provided)
statusstringNoFilter by session status (abandoned, active, ended, expired, pending, removed, replaced, revoked)
limitnumberNoNumber of results per page (1-500, default: 10)
offsetnumberNoNumber of results to skip for pagination

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

Retrieve a single session by ID from Clerk

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
sessionIdstringYesThe ID of the session to retrieve

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

Revoke a session to immediately invalidate it

Input

ParameterTypeRequiredDescription
secretKeystringYesThe Clerk Secret Key for API authentication
sessionIdstringYesThe ID of the session to revoke

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 60,000 builders.
Build Agentic workflows visually on a drag-and-drop canvas or with natural language.
Get started