Skip to main content
Mock Server

Fake the API you're waiting for

Your app calls an API that isn't ready yet, is slow, or costs money per call. Describe the answer once — method and path in, status, headers and body out — and point your app at Buggregator. Every call is captured, so you also see exactly what your app sent.

Get started Rules in the UI, the API, YAML or from an OpenAPI spec
127.0.0.1:8000

Rules on the left, in match order. Calls to /mock/ on the right, live. Example data.

Answers you control, calls you can see

Build and test against any API without waiting for it, paying for it, or writing a stub server.

🧬

Responses that follow the request

Turn on template for a rule, and its body and headers can use the request: the path {id}, query, headers, JSON body fields. Add fake names, emails and dates, loops and if/else. Body up to 1 MB. Write it in the rule form, with the helpers and fake data one click away, and run a preview before you save.

Template reference →
💥

Errors on demand

Answer 500 or 429 and see how your app handles a failing API.

⏱️

Slow responses

Add up to 30 seconds of delay to test timeouts, retries and loading states.

🧭

Start from your OpenAPI spec

Paste a spec, load a file or give a URL: one rule per operation, with bodies from the spec's examples or fake data from its schemas. Import again and the group's rules are replaced.

🔍

Why didn't it match?

An unmatched call gets 404 and is still captured, with the rules that almost matched and why: method, project or disabled. Start a rule from that request in one click — method and path prefilled.

🔁

Same answers in CI

Put rules in buggregator.yaml. Every test run and every teammate gets the same responses.

Setup in 60 seconds

No registration. No account. Start it and point your app at it.

1

Start Buggregator

Requires Buggregator v2.6.0 or later; the template editor and OpenAPI import in the UI need v2.7.0. The mock server answers on the UI port, 8000. Nothing to turn on. One file, about 40 MB, installed with one command. Prefer containers? Use the Docker tab.

$ curl -fsSL https://raw.githubusercontent.com/buggregator/server/master/scripts/install.sh | sh
$ HTTP_ADDR=127.0.0.1:8000 \
  SMTP_ADDR=127.0.0.1:1025 \
  VAR_DUMPER_ADDR=127.0.0.1:9912 \
  MONOLOG_ADDR=127.0.0.1:9913 \
  PROXY_ADDR=127.0.0.1:8080 \
  ~/.local/bin/buggregator

El script elige el archivo para tu procesador: Intel/AMD o ARM.

Un solo archivo para Linux, macOS y Windows, de unos 40 MB. No hace falta instalar nada más.

Esta línea lo deja solo en este equipo. Sin los ajustes *_ADDR escucha en todas las interfaces de red →

¿Prefieres no ejecutar un script? Descarga el archivo tú mismo →

2

Add a rule

Open Mock server in the sidebar and add a rule, or define it in code. Rules are checked in order; the first enabled rule that matches answers. Paths: exact paths, {id} for one segment, * for the rest: /users/me, /users/{id}, /files/*.

mocks:
  - name: user
    method: GET
    path: /users/{id}
    status: 200
    headers: { Content-Type: application/json }
    body: '{"id": 1, "name": "Jane"}'
    delay: 150ms
3

Point your app at /mock

Replace the API's base URL with http://127.0.0.1:8000/mock (rule paths go without the /mock prefix; in Docker Compose use the service name). Each call appears on the Mock server page: what your app sent, and what the mock answered.

$ curl http://127.0.0.1:8000/mock/users/42
{"id": 1, "name": "Jane"}

Works with any HTTP client

It's plain HTTP. Anything that can call a URL can call a mock.

PHP— Guzzle, Laravel HTTP, Symfony HttpClient
JavaScript— fetch, axios; build the frontend before the backend is ready
Browsers— CORS preflight answered by default
Any language— change the API's base URL
CI— rules in buggregator.yaml

Ready to try it?

One command to start. No account needed.

Also built into Buggregator