Clerk Sandbox
A stateful Clerk Backend API sandbox with all 196 endpoints, 14 pre-seeded resource types, and webhook events on every state change. Test your auth integration without burning real sign-ups, sending real magic links, or polluting your Clerk dashboard with test users.
Test Scenarios
Run real auth state transitions and webhook events without a Clerk account or real users.
User Created
POST /users with email + metadata, fires user.created
User Banned
Toggle banned state — subsequent reads reflect it
Session Lifecycle
Create, refresh, revoke session with matching events
Organization Setup
Create org, add members, assign roles
Invitation Flow
pending → accepted or revoked invitation states
OAuth Connection
Simulate Google/GitHub/SSO connection profiles
Magic Link
Generate sign-in tokens without sending real email
Webhook Replay
Re-deliver any user/session/org event for handler testing
Role + Permission
Test org:admin vs org:member access paths
Pre-seeded Resources
Every Clerk sandbox starts with realistic data across all 14 resource types.
How It Works
- 1
Open the portal
A stateful Clerk environment is provisioned in under 2 seconds — no signup, no Clerk dashboard.
- 2
Point your backend at the sandbox URL
Replace api.clerk.com with the sandbox base URL. Use the sandbox bearer token in place of your CLERK_SECRET_KEY.
- 3
Create users, sessions, organizations
Every POST persists. Subsequent GETs reflect the state. State machines enforce valid transitions.
- 4
Verify your webhook handler
Replay user.created, session.revoked, organization.created and 9 more events into your handler to test signature verification, idempotency, and retries.
Why a Clerk sandbox?
Clerk's real API is excellent — but testing your backend integration against it creates real users, sends real emails and SMS, fires real webhooks, and pollutes your dashboard. Roll back is manual. Sharing a dev instance with teammates causes cross-test interference. Running in CI means giving CI a real Clerk secret.
FetchSandbox runs a fully stateful Clerk Backend API mock. All 196 endpoints. The full session and org lifecycle. Webhook events on every state change. No real email or SMS. No dashboard pollution. No shared state between teammates.
Use the real Clerk for production and end-to-end auth flow testing. Use FetchSandbox for unit tests, webhook handler tests, integration tests in CI, and onboarding new engineers without giving them production secrets.
FAQ
Do I need a Clerk account?
No. FetchSandbox runs a fully local mock of the Clerk Backend API. No Clerk dashboard, no real users, no real emails.
Does it support organizations and roles?
Yes. Create organizations, add members, assign org:admin or org:member roles, and test permission gates against the same routes you'd hit in production.
Can I test my webhook handler?
Yes. Webhook events fire on every state change (user.created, session.revoked, organizationMembership.created, invitation.created, etc.) and can be replayed against your handler.
What's the difference vs Clerk's test mode?
Clerk's test mode still hits Clerk's servers and creates real users in a test environment. FetchSandbox runs entirely locally — no network calls to Clerk, no real users, no shared state.
Can I use this in CI?
Yes. Spin up a sandbox via the API, run your integration tests against it, then tear it down. No need to share a Clerk test environment across CI runs.
Related reads
Clerk webhook replay can duplicate users in your app state →
Ready to test your Clerk integration?
Free tier — 3 sandboxes, 10,000 requests/month. No credit card required.
Open Clerk Portal