Simulate a flaky API

Inject random errors and variable latency to catch bugs that only appear under load.

When to use this

Some bugs only surface when an upstream is unreliable. This mock fails a configurable share of requests with an alternate response and adds random latency in a min–max range, so your error handling and timeouts meet real-world chaos before production does.

Create the mock

curl -X POST https://quickmock.dev/api/mocks \
  -H 'Content-Type: application/json' \
  -d '{
  "method": "GET",
  "response_body": "{\"ok\":true}",
  "error_rate_pct": 30,
  "error_response": { "status": 503, "body": "{\"error\":\"unavailable\"}" },
  "response_delay_ms": 100,
  "response_delay_max_ms": 900
}'

Call it

curl https://quickmock.dev/m/<slug>

What you get

~30% of calls -> 503, the rest -> 200
latency varies 100-900 ms per call

Build your own

Create a mock

← All guides