Skip to content

Identity & auth

Clerk mock API

Clerk Backend API: users with ban/lock and metadata, organizations with memberships and invitations, sessions and sign-in tokens, allowlist/blocklist identifiers, and Svix-signed webhooks.

At a glance

Operations
267
Stateful operations
40
Stateful resources
6
Webhook events
6
Vendor API version
2026-08-20
Verification
Spec-verified

How it works

Use Clerk without calling Clerk, Inc.

Authorization: Bearer sk_test_ExampleSecretKey0123456789

State

Resources that remember

Writes persist per caller, so a create followed by a read returns what you created.

ResourceOperations
Users12
Organizations5
Organization memberships4
Invitations7
Sessions and sign-in tokens6
Allowlist and blocklist identifiers6

Webhooks

Events your handlers can receive

Deliveries are signed with the svix scheme, so your verification code runs unchanged.

Coverage

267 operations

40 of them are stateful. The largest groups:

GroupOperations
Other operations227
Users12
Invitations7
Allowlist and blocklist identifiers6
Sessions and sign-in tokens6
Organizations5

Verification

Spec-verified

Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.

1 operations cannot be checked against the specification.

Source and limits

License, source and limits

Each collection holds up to 1 MiB of objects per API key; writes beyond that are dropped (x-maxoperf-vs-state: capacity). State is isolated by the Authorization header. Stateful: users (create, get, list, count, update, delete, ban/unban/lock/unlock, metadata merge and replace), organizations (by id or slug), organization memberships, instance and organization invitations, sessions, sign-in tokens and allowlist/blocklist identifiers; every other Backend API operation answers a schema-valid stateless sample. List shapes follow the pinned spec: users, sessions, instance invitations and allowlist identifiers are bare arrays, the rest are {data,total_count}. List filters take the first value of a repeated array parameter (email_address[], username, external_id, user_id, role); limit above 100 is capped at 100 when starting_after is used (1000 otherwise, Clerk allows 500); order_by supports created_at/updated_at (and username/first_name/last_name for users, name for organizations) with a leading - for descending. PATCH /users/{id}/metadata merges top-level keys (not deep); PATCH /users/{id} replaces the metadata objects it carries. A new organization gets a generated slug (org-xxxxxxxx) when none is sent, instead of a slugified name. Deleting a user or an organization does not cascade to memberships, pending_invitations_count is seeded but not recomputed, and revoking an already revoked invitation or session answers the revoked object again. Sessions are created active and only revoke changes their status; sign-in tokens are never consumed. Unknown ids of the Clerk shape answer 404 resource_not_found; the 401 and validation error texts follow the Clerk error envelope but their exact strings are not published in the spec. Webhooks (user.created/updated/deleted, organization.created, organizationMembership.created, session.created) go to the Virtual Service webhook setting, signed with the Svix scheme (svix-id, svix-timestamp, svix-signature).

MaxoPerf is not affiliated with, endorsed by, or sponsored by Clerk, Inc. Clerk is a trademark of its owner.