Clerk Tools
Manage users, organizations, and sessions in your Clerk authentication application via workflow blocks.
Clerk is an authentication and user management platform. Use these tools in your workflows to programmatically manage users, organizations, and sessions — for example, syncing new sign-ups to a CRM, automating user provisioning, or revoking sessions on security events.
Overview
| Property | Value |
|---|---|
| Provider | clerk |
| Category | tools |
| Auth | Bearer Token (Clerk Secret Key passed as secretKey) |
Operations
| Operation | Tool ID | Description |
|---|---|---|
| List Users | clerk_list_users | List all users with optional filtering and pagination |
| Get User | clerk_get_user | Retrieve a single user by their Clerk user ID |
| Create User | clerk_create_user | Create a new user in your Clerk application |
| Update User | clerk_update_user | Update an existing user's profile or metadata |
| Delete User | clerk_delete_user | Delete a user from your Clerk application |
| List Organizations | clerk_list_organizations | List all organizations with optional filtering |
| Get Organization | clerk_get_organization | Retrieve a single organization by ID or slug |
| Create Organization | clerk_create_organization | Create a new organization in your Clerk application |
| List Sessions | clerk_list_sessions | List sessions for a user or client |
| Revoke Session | clerk_revoke_session | Revoke a session to immediately invalidate it |
Configuration
clerk_list_users
GET https://api.clerk.com/v1/users
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication (e.g. sk_live_...) |
limit | number | No | Number of results per page (range: 1–500, default: 10) |
offset | number | No | Number of results to skip for pagination |
orderBy | string | No | Sort field with +/- prefix (default: -created_at) |
emailAddress | string | No | Filter by email address; comma-separate multiple values |
phoneNumber | string | No | Filter by phone number; comma-separate multiple values |
externalId | string | No | Filter by external ID; comma-separate multiple values |
username | string | No | Filter by username; comma-separate multiple values |
userId | string | No | Filter by user ID; comma-separate multiple values |
query | string | No | Search query across email, phone, username, and names |
clerk_get_user
GET https://api.clerk.com/v1/users/{userId}
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
userId | string | Yes | The Clerk user ID to retrieve (e.g. user_xxx) |
clerk_create_user
POST https://api.clerk.com/v1/users
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
emailAddress | string | No | Email address(es) for the user; comma-separate multiple values |
phoneNumber | string | No | Phone number(s) for the user; comma-separate multiple values |
username | string | No | Username (must be unique in your application) |
password | string | No | Password (minimum 8 characters) |
firstName | string | No | First name |
lastName | string | No | Last name |
externalId | string | No | External system identifier (must be unique) |
publicMetadata | json | No | Public metadata object visible to the frontend |
privateMetadata | json | No | Private metadata object visible only server-side |
unsafeMetadata | json | No | Unsafe metadata object writable by the frontend |
skipPasswordChecks | boolean | No | Skip password validation checks |
skipPasswordRequirement | boolean | No | Make password optional for this user |
clerk_update_user
PATCH https://api.clerk.com/v1/users/{userId}
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
userId | string | Yes | The ID of the user to update |
firstName | string | No | First name |
lastName | string | No | Last name |
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 a verified email address to set as primary |
primaryPhoneNumberId | string | No | ID of a verified phone number to set as primary |
publicMetadata | json | No | Public metadata object (replaces existing) |
privateMetadata | json | No | Private metadata object (replaces existing) |
unsafeMetadata | json | No | Unsafe metadata object (replaces existing) |
skipPasswordChecks | boolean | No | Skip password validation checks |
clerk_delete_user
DELETE https://api.clerk.com/v1/users/{userId}
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
userId | string | Yes | The ID of the user to delete |
clerk_list_organizations
GET https://api.clerk.com/v1/organizations
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
limit | number | No | Number of results per page (range: 1–500, default: 10) |
offset | number | No | Number of results to skip for pagination |
includeMembersCount | boolean | No | Include member count for each organization in the response |
query | string | No | Search by organization ID, name, or slug |
orderBy | string | No | Sort field with +/- prefix |
clerk_get_organization
GET https://api.clerk.com/v1/organizations/{organizationId}
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
organizationId | string | Yes | The ID or slug of the organization to retrieve |
clerk_create_organization
POST https://api.clerk.com/v1/organizations
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
name | string | Yes | The name of the organization |
createdBy | string | Yes | The user ID of the initial admin of the organization |
slug | string | No | A unique URL slug for the organization |
maxAllowedMemberships | number | No | Maximum number of memberships (0 = unlimited) |
publicMetadata | json | No | Public metadata object |
privateMetadata | json | No | Private metadata object |
clerk_list_sessions
GET https://api.clerk.com/v1/sessions
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
userId | string | No | User ID to filter sessions for |
clientId | string | No | Client ID to filter sessions for |
status | string | No | Filter by session status: abandoned, active, ended, expired, pending, removed, replaced, or revoked |
limit | number | No | Number of results per page (range: 1–500, default: 10) |
offset | number | No | Number of results to skip for pagination |
clerk_revoke_session
POST https://api.clerk.com/v1/sessions/{sessionId}/revoke
| Parameter | Type | Required | Description |
|---|---|---|---|
secretKey | string | Yes | Clerk Secret Key for API authentication |
sessionId | string | Yes | The ID of the session to revoke |
Outputs
clerk_list_users
users(array) — Array of Clerk user objects matching the querytotalCount(number) — Total number of users matching the query (fromx-total-countresponse header)
clerk_get_user
id(string) — User IDusername(string) — UsernamefirstName(string) — First namelastName(string) — Last nameemailAddresses(array) — List of email address objects associated with the user
clerk_create_user
id(string) — Created user IDemailAddresses(array) — Email addresses associated with the new user
clerk_update_user
id(string) — Updated user IDemailAddresses(array) — Email addresses associated with the user
clerk_delete_user
id(string) — Deleted user IDdeleted(boolean) — Whether the user was successfully deleted
clerk_list_organizations
organizations(array) — Array of Clerk organization objectstotalCount(number) — Total number of organizations
clerk_get_organization
id(string) — Organization IDname(string) — Organization name
clerk_create_organization
id(string) — Created organization IDname(string) — Organization nameslug(string) — Organization slug
clerk_list_sessions
sessions(array) — Array of Clerk session objectstotalCount(number) — Total number of sessions (fromx-total-countresponse header)
clerk_revoke_session
id(string) — Session IDstatus(string) — Session status after revocation (revoked)
YAML Example
clerk_1:
type: clerk
name: "Clerk"
inputs:
operation: "clerk_list_users"
secretKey: "{{CLERK_SECRET_KEY}}"
limit: 50
query: "{{trigger.searchQuery}}"
connections:
outgoing:
- target: next-block-idTips
- Your Clerk Secret Key starts with
sk_live_(production) orsk_test_(development). Store it as an environment variable and reference it as{{CLERK_SECRET_KEY}}— never hardcode it in a workflow. - When filtering list endpoints with comma-separated values (e.g.
emailAddress,userId), the tool splits them automatically and sends each as a separate query parameter, which is what the Clerk API expects. - To revoke all sessions for a user during a security incident, first call
clerk_list_sessionswith theuserIdfilter andstatus: active, then loop over the results and callclerk_revoke_sessionfor each session ID using{{clerkListSessions.sessions}}.