API mocking

Mock the APIs you depend on, faults and all

Stand up a mock server from your requests, let anything unmatched pass through to the real backend, inject the failures you can never reproduce on demand, and model stateful behaviour. Run it from the app, the CLI, or hosted in the cloud.

Get started Get the desktop app

Real responses, defined where you work

Turn a request into a mock route in a click, or author routes directly: match on method and path, return the status, headers, and body you need. Front-end work and tests stop waiting on a backend that is not ready.

Routes live alongside your collection, so the mock and the real tests share one definition.

  • Match on method and path
  • Return any status, headers, and body
  • Promote a real request to a mock instantly
Mock routes matched on method and path. · click to enlarge

Passthrough: mock a little, proxy the rest

When a request does not match any route, the mock server forwards it to the real backend and returns the real response. Mock the one endpoint you are changing and let everything else stay live, so you never have to stub a whole API to test a corner of it.

Passthrough is per mock, so each mock server points at its own upstream.

  • Unmatched requests proxy to the real backend
  • Mock one route, keep the rest real
  • Upstream target configured per mock
An unmatched request passed through to the real API. · click to enlarge

Fault injection and delays

Reproduce the failures that only ever happen in production. Return an empty response, a malformed chunk, random bytes then a close, or a connection reset, and add latency to any route. Test your timeouts, retries, and circuit breakers on purpose instead of by accident.

Faults are WireMock-style and set per route, so one endpoint can misbehave while the rest stay healthy.

  • Empty, malformed, reset, and random-then-close faults
  • Add latency to model slow dependencies
  • Exercise retries, timeouts, and circuit breakers
A route set to reset the connection on demand. · click to enlarge

Stateful scenarios

Model behaviour that changes between calls. A route can require a scenario state and move to a new one, so a resource reads as pending on the first call and complete on the next, or a token expires after use. Stateful flows become testable without a real backend behind them.

State is tracked per mock server, with the nearest matching rule winning, so complex sequences stay predictable.

  • Responses that depend on prior calls
  • Model created, pending, then complete sequences
  • Per-server state you can reset between runs
A scenario advancing state across requests. · click to enlarge

Dynamic data

Template a response with faker-style helpers so every call returns fresh, realistic data: a new id, a plausible name, a timestamp. Your UI and tests see variety instead of the same canned record every time.

  • Faker-style templating in responses
  • Fresh ids, names, and timestamps per call
  • Realistic payloads without a database
A templated response returning fresh data each call. · click to enlarge

Run it anywhere

Start a mock from the desktop app while you build, run it headless from the CLI in a pipeline, or host it in the cloud as an always-on endpoint your whole team and your CI can hit. Same routes, same behaviour, wherever it runs.

  • Local from the app, headless from the CLI
  • Hosted in the cloud as a shared endpoint
  • Identical behaviour across all three
Start a mock from the app, the CLI, or hosted in the cloud. · click to enlarge

How mocking works

  1. 1

    Define routes

    Promote real requests to mock routes or author them directly, with the status, headers, and body you want.

  2. 2

    Point passthrough at the backend

    Set the upstream so anything you have not mocked proxies to the real API and comes back live.

  3. 3

    Add faults and state

    Attach latency, faults, and scenario state to the routes that need to misbehave or change between calls.

  4. 4

    Run and share

    Run it locally, in CI, or host it in the cloud so the rest of the team hits the same endpoint.

Frequently asked questions

What happens to requests I have not mocked?

With passthrough on, they are proxied to the real backend and you get the real response. You can mock only the endpoints you are changing and leave the rest live.

Which faults can I inject?

Empty response, malformed response chunk, random data then close, and connection reset, plus configurable delays. They are set per route so one endpoint can fail while the others stay healthy.

Can a mock behave differently on repeat calls?

Yes. Scenario state lets a route require one state and move to another, so a resource can read pending then complete, or a token can expire after use.

Can the whole team use one mock?

Host the mock in the cloud and it becomes an always-on endpoint your teammates and your CI can all hit, with the same routes you run locally.

Explore more

Testing

API testing →

Contract testing

Contract testing →

Performance

Performance testing →

Start free. Pay when it saves you time.

The desktop app is free and open source. Add the cloud when you want hosted mocks, monitoring, and a shared broker.