Skip to main content
Core concept

Stateful API Sandbox

A stateful API sandbox is the missing layer between a mock server and the real API. It keeps state across requests, enforces lifecycle transitions, fires real webhook events, and lets you test the kind of multi-step flows where most integrations actually break.

41 APIs pre-bundled9,300+ endpoints0 signups required2s to spin up
Open Dashboard →

Why stateful matters

Most testing tools are mock servers in disguise. They return canned responses for configured paths and have no memory of what happened in the previous request. That works for unit tests. It does not work for integration tests, because real integrations are about what happens after a request — the second read, the webhook, the state transition, the retry.

We wrote a longer piece on exactly this distinction: stateful API sandbox vs mock server. The short version: if your test cares about what the system looks like after your request, you need a sandbox, not a mock.

What you get

Persistent state

POST creates a resource that the next GET returns. State survives across the whole session.

Lifecycle state machines

Subscriptions trialing → active → paused → canceled. Orders pending → fulfilled. Real transitions, not stubbed.

Webhook events

Every state change fires the matching webhook event. Replay any event into your handler.

Generated from OpenAPI

Upload any OpenAPI 3.x spec and get a working sandbox in 2 seconds. 41 popular APIs are pre-bundled.

Per-session isolation

Your CI run does not collide with your colleague's. No shared state, no flakiness.

No quota, no rate limits

Hit it as hard as you want. Run 10,000 parallel test requests without getting throttled.

Pre-bundled APIs

Click to launch any of these. Or browse the full catalog of the bundled specs.

How it actually works

  1. 1

    Spin up a sandbox

    POST /api/sandboxes with a spec ID. You get a base URL and a test API key in under 2 seconds.

  2. 2

    Point your client at the sandbox URL

    Replace api.stripe.com (or wherever) with the sandbox base URL. Same routes, same payloads, no other code changes.

  3. 3

    Run real flows

    POST a customer, POST a subscription that references it, GET the subscription back, watch the customer relationship persist.

  4. 4

    Test webhook handlers

    Every state change fires the matching webhook. Replay any event into your handler to test signature verification, idempotency, and retries.

FAQ

How is this different from a mock server?

A mock server returns canned responses with no memory. A stateful sandbox actually persists what you posted, enforces state machine transitions, and fires real webhook events. Most “sandboxes” in the wild are mock servers with marketing copy.

Can I use my own OpenAPI spec?

Yes. Upload any OpenAPI 3.x spec and FetchSandbox provisions a stateful sandbox automatically — endpoints, schemas, auth, and state machines all derived from the spec.

Is it free?

Free tier covers 3 sandboxes and 10,000 requests/month. No credit card required.

Does it work in CI?

Yes. Spin up a sandbox via the API at the start of your test run, hit it from your tests, tear it down. Per-session isolation means no flakiness from shared state.

Ready to try a stateful sandbox?

Start from the API sandbox overview (sandbox for APIs) or open the dashboard. Free tier — 3 sandboxes, 10,000 requests/month.

Open Dashboard