A mock server is a stand-in for an API: a small server on your computer that answers the API’s routes with the
examples of its OpenAPI spec. Build the frontend before the backend exists, keep working while the real API is down,
or try an error page by asking for a 404 — the mock answers the same way every time, with no database behind it.
The mock lives inside DialCatz and needs nothing else. DevCatz and DoCatz can ask for one and give it a name of their own; see In the family.
In three steps
- Have a collection made from a spec: import an OpenAPI or Swagger document (Import → File or paste, or Import → OpenAPI in a project), or follow one with Spec → Follow a spec file… / Follow a spec URL… — see OpenAPI: follow, check, mock and export.
- Right-click the collection → Spec → Mock server… → Start.
- Point your frontend at the address it shows,
http://127.0.0.1:<port>— or press Send requests here to send the collection’s own requests to it.
Start it
The panel, Mock server for “<collection>”, says how many of the collection’s requests it can answer — the ones that came from the spec. Leave Port empty and press Start:
- It listens on 127.0.0.1 only, so nothing outside your computer reaches it, and stops when DialCatz quits.
- The port is 4010 or the next free one up to 4099. Ports DevCatz has handed out or uses (its sites start at 4100; its databases, mail and storage), ports DoCatz uses (its proxy, and ports its running containers publish), and any port something already answers on are skipped. A port you type yourself is refused for the same reasons.
- The tree shows a mock mark on the collection while it runs; click it to open the panel again.
A collection with no requests from a spec says No request here has responses from a spec yet: import the API from an OpenAPI or Swagger document, or, for a collection that already follows one, use Spec → Check for changes… once.
What it answers
| A call to | Gets |
|---|---|
| A path and method the spec has | The spec’s example for its first 2xx response, else a body made from the response’s schema, with that status and content type |
The same, with the header Prefer: code=404 |
The spec’s response for that status instead |
| A path the spec has, with another method | 405, with an Allow header and the methods it does have |
| A path the spec does not have | 404, with the routes it does have |
The body of a call is not read: the mock answers the same whatever is sent. CORS is open, so a frontend in a browser can call it. The collection is read again on every call, so a spec update or an edited request shows at once. An event-stream response answers with its example as Server-Sent Events.
While it runs
- Running · answers N requests, and Stop server.
- The address,
http://127.0.0.1:<port>: click it to open it in your browser (the one chosen in Settings → General → Open with), or copy it. Point your frontend at this address. - Its own domain, from DevCatz (or from DoCatz): when DevCatz or DoCatz serves the mock on a domain of its own —
shop-api.dialcatz.testfrom DevCatz,dialcatz-mock.<project>.docatz.<ending>from DoCatz — it shows here, with Open in DevCatz or Open in DoCatz to go to the mock’s page there. - Try it in DialCatz → Send requests here — see Send requests here.
- Latest calls: status, method, path, the request that answered (or no such request) and how long ago. Before the first one it suggests an address to try.
Send requests here
Send requests here points the collection itself at the mock. DialCatz makes an environment named
Mock · <collection>, with the collection’s own address variable (such as baseUrl) set to the mock, and switches
to it: the collection’s own environment when it picks one, else the workspace’s active one. The panel closes and one of
the collection’s requests opens in a tab (the first GET the mock answers), ready to send.
The panel then says In use. Switch back, or stopping the mock, puts back the environment the collection used before.
Asked for by DevCatz or DoCatz
DevCatz’s and DoCatz’s Create mock server ask DialCatz for a mock through a dialcatz://mock link. DialCatz uses
the collection that follows that spec file or is paired with that service, in any workspace; when there is none, it
asks first — Make a mock server? — and Import and start imports it into the open workspace. Then it starts the
mock and opens its panel. DevCatz and DoCatz show the mock’s domain on their side. See
With DevCatz, DBCatz and DoCatz.
In the family
The same mock, three ways in. DialCatz always runs it; DevCatz and DoCatz give it a name of their own and come back to it in one click.
| From | Where | The mock gets |
|---|---|---|
| DialCatz | A collection → Spec → Mock server… | http://127.0.0.1:<port> |
| DevCatz | A site’s API tab → an OpenAPI file → Create mock server | https://<name>.dialcatz.<tld> (HTTPS and HTTP), a page with a curl line, a name you can change and Write to .env for a site |
| DoCatz | An API container → Create mock server | https://dialcatz-mock.<project>.docatz.<ending> (or dialcatz-mock-<service>.… when the project has several), answering while the engine sleeps |
DialCatz lists its running mocks in its bridge.json; DevCatz and DoCatz read it, serve their names, and list those
names back so the panel above can show them. The links between them are dialcatz://mock?… (make and start one),
devcatz://mocks?… and docatz://mocks?… (the mock’s page there) — see What the cats share.
With an AI assistant
Through MCatzP, an assistant can list the running mocks (list_mocks) at once and, after you
allow it, start one (start_mock), point the collection at it (use_mock_environment) or stop it (stop_mock, which
runs without asking). DevCatz’s and DoCatz’s tools can ask DialCatz for a mock of a site or a container
(create_mock_server) and open one (open_mock_in_dialcatz, open_mock_server).
Limits
- It answers from the spec, not from data: the body of a call is not read, and nothing is stored between calls.
- Only requests that came from a spec can be answered; a request you built by hand in the same collection cannot.
- It listens on
127.0.0.1only and stops when DialCatz quits. With DevCatz or DoCatz installed, their names reach it from your browser and, for DoCatz, from inside your containers.
Last updated 2026-11-20