Skip to content

Mock Studio ​

Mock Studio is a desktop app that runs a mock API server on your computer. You describe the endpoints in a form, press Start server, and any app, browser or phone that calls the address gets the responses you wrote.

Mock Studio showing the sample project with the Health check endpoint open
The sample project, My First Mock API, with its server running.

What a mock server is ​

A mock server is a stand-in for a real API. It listens on an address, such as http://localhost:8080, and answers requests with replies you decide in advance. Nothing behind it stores data or runs business logic.

People use a mock when:

  • the real API is not built yet, and the app that calls it has to be written now;
  • the real API is slow, costs money per call, or needs credentials you do not have;
  • you want to see how your app behaves when the API is slow, returns an error or drops the connection, which is hard to produce on demand with a real server;
  • you want a demo or a test that gives the same answer every time.

If the words API, endpoint or status code are new to you, read What is an API and HTTP basics first. Your first mock server explains the idea in more depth.

What Mock Studio does ​

You want toMock Studio featurePage
Answer GET /users/42 with JSONEndpoints with path templatesEndpoints and paths
Choose the status, body and headersResponse editorResponses
Answer differently on each callFour response strategiesResponse strategies
Return 200 or 401 depending on the requestConditional rulesConditional rules
Echo the request or invent dataTemplating tokensDynamic templating
Simulate a slow or broken APIDelay, jitter and faultsLatency and faults
Require a login header, allow browsersAuth gate, CORS, project settingsAuth, CORS and project settings
Try an endpoint without leaving the appBuilt-in testerBuilt-in tester
See what your app really callsLive request logLive request log
Call the mock from a phone or the internetLAN addresses, QR code, tunnelsShare on LAN or the internet
Mock part of an API and pass the rest throughProxy and recordProxy and record
Send many users through a journeyFlowsFlows: load and user journeys
Start from an existing collectionPostman importImport from Postman
Start from an API descriptionOpenAPI importImport OpenAPI or Swagger
Keep mocks in Git and share themOne JSON file per projectProjects, files and Git

New here? Follow these three pages in order:

  1. Install
  2. Tour of the window
  3. Your first mock API

The Quick reference has every syntax table on one page, and Troubleshooting covers the common problems.

Who it is for ​

  • Front-end and mobile developers who need an API to call before the back end exists.
  • Testers who need repeatable replies, error cases and slow responses. See Testing with mocks and Resilience testing.
  • Students and beginners who want to see what an HTTP request and response look like. Every field in the app has a question-mark icon that explains it with an example.
  • API teams who want to hand a working example of an API to others as a file.

Platforms ​

This section describes version 1.2.0. It is published for Linux:

  • a .deb package for 64-bit Intel and AMD computers (amd64) running Debian, Ubuntu and related systems;
  • a snap in the Snap Store.

See Install for the commands. On a narrow window or a small screen the app switches to a phone layout with navigation at the bottom.

Privacy ​

Mock Studio has no accounts, analytics, telemetry or update checks, and it sends nothing to Dhiva Labs. The only network activity is what you start:

  • the mock server, which listens on the port you choose while it is running;
  • test requests and flows you send;
  • proxy passthrough, if you set a real API address;
  • a public tunnel, if you start one. It runs the cloudflared or ngrok program installed on your computer, and that service's own privacy policy covers the traffic.

Projects are saved as JSON files in your Documents folder. The request log is kept in memory and is cleared when you quit. The full policy is in the project repository.

Get help ​

Report a problem or ask a question on the GitHub issues page.