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.
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.
List all users in your Clerk application with optional filtering and pagination
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
limit | number | No | Number of results per page (1-500, default: 10) |
offset | number | No | Number of results to skip for pagination |
orderBy | string | No | Sort field with optional +/- prefix for direction (default: -created_at) |
emailAddress | string | No | Filter by email address (comma-separated for multiple) |
phoneNumber | string | No | Filter by phone number (comma-separated for multiple) |
externalId | string | No | Filter by external ID (comma-separated for multiple) |
username | string | No | Filter by username (comma-separated for multiple) |
userId | string | No | Filter by user ID (comma-separated for multiple) |
query | string | No | Search query to match across email, phone, username, and names |
| Parameter | Type | Description |
|---|
users | array | Array of Clerk user objects |
↳ id | string | User ID |
↳ username | string | Username |
↳ firstName | string | First name |
↳ lastName | string | Last name |
↳ imageUrl | string | Profile image URL |
↳ hasImage | boolean | Whether user has a profile image |
↳ primaryEmailAddressId | string | Primary email address ID |
↳ primaryPhoneNumberId | string | Primary phone number ID |
↳ emailAddresses | array | User email addresses |
↳ id | string | Email address ID |
↳ emailAddress | string | Email address |
↳ phoneNumbers | array | User phone numbers |
↳ id | string | Phone number ID |
↳ phoneNumber | string | Phone number |
↳ externalId | string | External system ID |
↳ passwordEnabled | boolean | Whether password is enabled |
↳ twoFactorEnabled | boolean | Whether 2FA is enabled |
↳ banned | boolean | Whether user is banned |
↳ locked | boolean | Whether user is locked |
↳ lastSignInAt | number | Last sign-in timestamp |
↳ lastActiveAt | number | Last activity timestamp |
↳ createdAt | number | Creation timestamp |
↳ updatedAt | number | Last update timestamp |
↳ publicMetadata | json | Public metadata |
totalCount | number | Total number of users matching the query |
success | boolean | Operation success status |
Retrieve a single user by their ID from Clerk
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
userId | string | Yes | The ID of the user to retrieve |
| Parameter | Type | Description |
|---|
id | string | User ID |
username | string | Username |
firstName | string | First name |
lastName | string | Last name |
imageUrl | string | Profile image URL |
hasImage | boolean | Whether user has a profile image |
primaryEmailAddressId | string | Primary email address ID |
primaryPhoneNumberId | string | Primary phone number ID |
primaryWeb3WalletId | string | Primary Web3 wallet ID |
emailAddresses | array | User email addresses |
↳ id | string | Email address ID |
↳ emailAddress | string | Email address |
↳ verified | boolean | Whether email is verified |
phoneNumbers | array | User phone numbers |
↳ id | string | Phone number ID |
↳ phoneNumber | string | Phone number |
↳ verified | boolean | Whether phone is verified |
externalId | string | External system ID |
passwordEnabled | boolean | Whether password is enabled |
twoFactorEnabled | boolean | Whether 2FA is enabled |
totpEnabled | boolean | Whether TOTP is enabled |
backupCodeEnabled | boolean | Whether backup codes are enabled |
banned | boolean | Whether user is banned |
locked | boolean | Whether user is locked |
deleteSelfEnabled | boolean | Whether user can delete themselves |
createOrganizationEnabled | boolean | Whether user can create organizations |
lastSignInAt | number | Last sign-in timestamp |
lastActiveAt | number | Last activity timestamp |
createdAt | number | Creation timestamp |
updatedAt | number | Last update timestamp |
publicMetadata | json | Public metadata (readable from frontend) |
privateMetadata | json | Private metadata (backend only) |
unsafeMetadata | json | Unsafe metadata (modifiable from frontend) |
success | boolean | Operation success status |
Create a new user in your Clerk application
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
emailAddress | string | No | Email addresses for the user (comma-separated for multiple) |
phoneNumber | string | No | Phone numbers for the user (comma-separated for multiple) |
username | string | No | Username for the user (must be unique) |
password | string | No | Password for the user (minimum 8 characters) |
firstName | string | No | First name of the user |
lastName | string | No | Last name of the user |
externalId | string | No | External system identifier (must be unique) |
publicMetadata | json | No | Public metadata (JSON object, readable from frontend) |
privateMetadata | json | No | Private metadata (JSON object, backend only) |
unsafeMetadata | json | No | Unsafe metadata (JSON object, modifiable from frontend) |
skipPasswordChecks | boolean | No | Skip password validation checks |
skipPasswordRequirement | boolean | No | Make password optional |
| Parameter | Type | Description |
|---|
id | string | Created user ID |
username | string | Username |
firstName | string | First name |
lastName | string | Last name |
imageUrl | string | Profile image URL |
primaryEmailAddressId | string | Primary email address ID |
primaryPhoneNumberId | string | Primary phone number ID |
emailAddresses | array | User email addresses |
↳ id | string | Email address ID |
↳ emailAddress | string | Email address |
↳ verified | boolean | Whether email is verified |
phoneNumbers | array | User phone numbers |
↳ id | string | Phone number ID |
↳ phoneNumber | string | Phone number |
↳ verified | boolean | Whether phone is verified |
externalId | string | External system ID |
createdAt | number | Creation timestamp |
updatedAt | number | Last update timestamp |
publicMetadata | json | Public metadata |
success | boolean | Operation success status |
Update an existing user in your Clerk application
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
userId | string | Yes | The ID of the user to update |
firstName | string | No | First name of the user |
lastName | string | No | Last name of the user |
username | string | No | Username (must be unique) |
password | string | No | New password (minimum 8 characters) |
externalId | string | No | External system identifier |
primaryEmailAddressId | string | No | ID of verified email to set as primary |
primaryPhoneNumberId | string | No | ID of verified phone to set as primary |
publicMetadata | json | No | Public metadata (JSON object) |
privateMetadata | json | No | Private metadata (JSON object) |
unsafeMetadata | json | No | Unsafe metadata (JSON object) |
skipPasswordChecks | boolean | No | Skip password validation checks |
| Parameter | Type | Description |
|---|
id | string | Updated user ID |
username | string | Username |
firstName | string | First name |
lastName | string | Last name |
imageUrl | string | Profile image URL |
primaryEmailAddressId | string | Primary email address ID |
primaryPhoneNumberId | string | Primary phone number ID |
emailAddresses | array | User email addresses |
↳ id | string | Email address ID |
↳ emailAddress | string | Email address |
↳ verified | boolean | Whether email is verified |
phoneNumbers | array | User phone numbers |
↳ id | string | Phone number ID |
↳ phoneNumber | string | Phone number |
↳ verified | boolean | Whether phone is verified |
externalId | string | External system ID |
banned | boolean | Whether user is banned |
locked | boolean | Whether user is locked |
createdAt | number | Creation timestamp |
updatedAt | number | Last update timestamp |
publicMetadata | json | Public metadata |
success | boolean | Operation success status |
Delete a user from your Clerk application
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
userId | string | Yes | The ID of the user to delete |
| Parameter | Type | Description |
|---|
id | string | Deleted user ID |
object | string | Object type (user) |
deleted | boolean | Whether the user was deleted |
success | boolean | Operation success status |
List all organizations in your Clerk application with optional filtering
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
limit | number | No | Number of results per page (1-500, default: 10) |
offset | number | No | Number of results to skip for pagination |
includeMembersCount | boolean | No | Include member count for each organization |
query | string | No | Search by organization ID, name, or slug |
orderBy | string | No | Sort field (name, created_at, members_count) with +/- prefix |
| Parameter | Type | Description |
|---|
organizations | array | Array of Clerk organization objects |
↳ id | string | Organization ID |
↳ name | string | Organization name |
↳ slug | string | Organization slug |
↳ imageUrl | string | Organization image URL |
↳ hasImage | boolean | Whether organization has an image |
↳ membersCount | number | Number of members |
↳ pendingInvitationsCount | number | Number of pending invitations |
↳ maxAllowedMemberships | number | Max allowed memberships |
↳ adminDeleteEnabled | boolean | Whether admin delete is enabled |
↳ createdBy | string | Creator user ID |
↳ createdAt | number | Creation timestamp |
↳ updatedAt | number | Last update timestamp |
↳ publicMetadata | json | Public metadata |
totalCount | number | Total number of organizations |
success | boolean | Operation success status |
Retrieve a single organization by ID or slug from Clerk
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
organizationId | string | Yes | The ID or slug of the organization to retrieve |
| Parameter | Type | Description |
|---|
id | string | Organization ID |
name | string | Organization name |
slug | string | Organization slug |
imageUrl | string | Organization image URL |
hasImage | boolean | Whether organization has an image |
membersCount | number | Number of members |
pendingInvitationsCount | number | Number of pending invitations |
maxAllowedMemberships | number | Max allowed memberships |
adminDeleteEnabled | boolean | Whether admin delete is enabled |
createdBy | string | Creator user ID |
createdAt | number | Creation timestamp |
updatedAt | number | Last update timestamp |
publicMetadata | json | Public metadata |
success | boolean | Operation success status |
Create a new organization in your Clerk application
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
name | string | Yes | Name of the organization |
createdBy | string | Yes | User ID of the creator (will become admin) |
slug | string | No | Slug identifier for the organization |
maxAllowedMemberships | number | No | Maximum member capacity (0 for unlimited) |
publicMetadata | json | No | Public metadata (JSON object) |
privateMetadata | json | No | Private metadata (JSON object) |
| Parameter | Type | Description |
|---|
id | string | Created organization ID |
name | string | Organization name |
slug | string | Organization slug |
imageUrl | string | Organization image URL |
hasImage | boolean | Whether organization has an image |
membersCount | number | Number of members |
pendingInvitationsCount | number | Number of pending invitations |
maxAllowedMemberships | number | Max allowed memberships |
adminDeleteEnabled | boolean | Whether admin delete is enabled |
createdBy | string | Creator user ID |
createdAt | number | Creation timestamp |
updatedAt | number | Last update timestamp |
publicMetadata | json | Public metadata |
success | boolean | Operation success status |
List sessions for a user or client in your Clerk application
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
userId | string | No | User ID to list sessions for (required if clientId not provided) |
clientId | string | No | Client ID to list sessions for (required if userId not provided) |
status | string | No | Filter by session status (abandoned, active, ended, expired, pending, removed, replaced, revoked) |
limit | number | No | Number of results per page (1-500, default: 10) |
offset | number | No | Number of results to skip for pagination |
| Parameter | Type | Description |
|---|
sessions | array | Array of Clerk session objects |
↳ id | string | Session ID |
↳ userId | string | User ID |
↳ clientId | string | Client ID |
↳ status | string | Session status |
↳ lastActiveAt | number | Last activity timestamp |
↳ lastActiveOrganizationId | string | Last active organization ID |
↳ expireAt | number | Expiration timestamp |
↳ abandonAt | number | Abandon timestamp |
↳ createdAt | number | Creation timestamp |
↳ updatedAt | number | Last update timestamp |
totalCount | number | Total number of sessions |
success | boolean | Operation success status |
Retrieve a single session by ID from Clerk
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
sessionId | string | Yes | The ID of the session to retrieve |
| Parameter | Type | Description |
|---|
id | string | Session ID |
userId | string | User ID |
clientId | string | Client ID |
status | string | Session status |
lastActiveAt | number | Last activity timestamp |
lastActiveOrganizationId | string | Last active organization ID |
expireAt | number | Expiration timestamp |
abandonAt | number | Abandon timestamp |
createdAt | number | Creation timestamp |
updatedAt | number | Last update timestamp |
success | boolean | Operation success status |
Revoke a session to immediately invalidate it
| Parameter | Type | Required | Description |
|---|
secretKey | string | Yes | The Clerk Secret Key for API authentication |
sessionId | string | Yes | The ID of the session to revoke |
| Parameter | Type | Description |
|---|
id | string | Session ID |
userId | string | User ID |
clientId | string | Client ID |
status | string | Session status (should be revoked) |
lastActiveAt | number | Last activity timestamp |
lastActiveOrganizationId | string | Last active organization ID |
expireAt | number | Expiration timestamp |
abandonAt | number | Abandon timestamp |
createdAt | number | Creation timestamp |
updatedAt | number | Last update timestamp |
success | boolean | Operation success status |