Manage a Clerk instance — users, organizations, sessions, invitations and sign-in tokens — through the Backend API.
Clerk ships in the w6w first-party pack. It declares 30 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.
io.w6w.clerkClerk is a user authentication and management platform, and this app drives its Backend API — the server-to-server surface, distinct from the Frontend API and client SDKs a Clerk-powered app itself embeds. It creates, looks up, updates, bans and deletes users; merges metadata onto a user without clobbering the rest; manages B2B organizations, their memberships and invitations; lists and revokes sessions; and mints or revokes the two ways a backend hands someone a live session without touching a password: application-wide invitations and one-time sign-in tokens.
The API is a single global host (api.clerk.com) shared by every Clerk instance — the credential, not the URL, says which instance a call reaches, unlike platforms that key an integration off a per-tenant subdomain. It is also a moving target on shape: as of API version 2026-05-12, PATCH /users/{id} and PATCH /organizations/{id} no longer accept metadata fields at all — those now live behind dedicated /metadata endpoints with explicit merge (PATCH) or replace (PUT) semantics — and roughly half of this app’s list endpoints answer a bare JSON array while the other half wrap the same data in { data, total_count }, with no way to tell which from the URL alone.
Deliberately out of scope: anything from the Frontend API (client-side sign-in/sign-up flows, that surface’s own session cookies), JWT template and OAuth application management, SAML/enterprise SSO configuration, SCIM directory sync, and billing — all instance configuration or Frontend-only concepts, not workflow-shaped operations on the four resources above.
Three routes to the same 30 actions. The Workflow tab is generated from Clerk's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.
invitation-revoke Revoke a pending application invitation. Does not prevent the invitee from signing up on their own through the regular sign-up flow.
organization-delete Permanently delete an organization, its memberships, and its invitations.
organization-invitation-create Invite someone to an organization by email, sending them a join link.
organization-invitation-list List pending/accepted/revoked/expired invitations for an organization.
organization-invitation-revoke Revoke a pending organization invitation so the link can no longer be used.
organization-membership-create Add an existing user to an organization with a given role.
organization-membership-remove Remove a member from an organization. The user account itself is untouched.
organization-role-list List the organization roles configured for this instance.
organization-update Update an organization's name or slug. Does not touch metadata — use "Update organization metadata" for that.
organization-update-metadata Deep-merge public/private metadata onto an organization. Set a key to null to remove it.
session-list List sessions for a given user or client. Old/inactive sessions are periodically cleaned up and will not appear here.
sign-in-token-create Mint a one-time sign-in token for a user, redeemable to start a session without a password.
user-count Count users matching the given filters, without fetching the users themselves.
user-delete Permanently delete a user. Frees their email/phone for a future signup. Prefer "Ban user" when the intent is to revoke access rather than erase the account.
user-list List users, optionally filtered by email, phone, username, or a free-text query.
user-update Update a user's name, username, or password. Does not touch metadata — use "Update user metadata" for that.
user-update-metadata Deep-merge public/private/unsafe metadata onto a user. Set a key to null to remove it.
A workflow step names the app and the action, and the editor fills in the
connection when you pick one. This is the Step shape from the
workflow spec, carrying Clerk's real ids.
{
"manifestVersion": "2",
"name": "clerk-example",
"steps": [
{
"id": "invitation-create",
"uses": {
"app": "io.w6w.clerk",
"action": "invitation-create",
"connection": "conn_YOUR_CONNECTION_ID"
},
"with": {
"emailAddress": "<emailAddress>"
}
}
]
}invitation-create invitation-list organization-create organization-get organization-invitation-create +25 more actions available
Every app-specific value here is a blank you have to fill in. An
app action is reached through the connection that authenticates it, so the
address is a connection id, not the app id — and connections belong to your account,
so a public page cannot know yours. Create one for Clerk, then fill in
the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the
parameters that action declares. The call itself is real — the shape is transcribed
from the studio's own snippet builder, which prints the same kind of blanks — but
nothing in it is specific to Clerk. The Workflow tab is where this app's
real ids are.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { W6wClient, isActionRun } from "@w6w/sdk";
// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();
const envelope = await client.run({
urn: "conn_YOUR_CONNECTION_ID",
action: "invitation-create",
payload: {
emailAddress: "<value>",
// redirectUrl: "<value>",
// ignoreExisting: "<value>",
// expiresInDays: "<value>",
// publicMetadata: "<value>",
},
});
if (isActionRun(envelope)) console.log(envelope.value); npm install -g @w6w/cli w6w run conn_YOUR_CONNECTION_ID --action invitation-create --payload '{"emailAddress":"<value>"}' Give an AI agent Clerk — without giving it Clerk's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.
One tool call{
"name": "w6w_invoke",
"arguments": {
"ref": "app:io.w6w.clerk#invitation-create",
"input": {
"emailAddress": "<emailAddress>"
}
}
}
Every tool names its target with a single ref. The
app: form above doesn't name a connection at all — the
host resolves which of the caller's Clerk connections to sign
with, and refuses rather than guesses when the answer is ambiguous.
The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.
Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.
Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.
Clerk's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.
The MCP surface is part of the hosted platform. Clerk itself is MIT, and the runtime that executes it is source-available (FSL).
Clerk declares its own checks, so its health is a property of the app rather than something the host guesses at.
Atlassian Statuspage rollup for status.clerk.com, with per-component detail. Unauthenticated and unsigned.
Reads this connection's own Clerk instance and reports whether it is development or production — the two enforce different rate limits and validation.