Open sourceActive

Mockoon

Open-source tool for creating mock APIs, with desktop, CLI, and serverless options.

Open source page

Field note

What it does

Mockoon lets you design and run mock REST APIs locally or in the cloud, with a desktop app, CLI, and serverless library.

Capabilities

Available capabilities

Tags

Tags

Ways to use it

Ways to use it

other

Not filed / Not filed

cli

Node.js / @mockoon/cli

other

Not filed / Not filed

cli

Not filed / Not filed

rest

Not filed / Not filed

openapi

Not filed / Not filed

Product features

Product features

API Integration Testing

Validate how your application handles different API responses and error scenarios.

API prefix

Prefix all environment routes, e.g. http://localhost:port/myprefix/myroute.

Automatic Port Increment

Port number is automatically incremented for each new environment.

Autogenerated IDs

POST inserts a new object with an autogenerated id if not provided.

Broadcast streaming

All clients receive identical messages in the same order and intervals.

Callbacks

Trigger HTTP requests from responses.

CLI

Command-line interface to run mock servers from data files.

Conversational mode

Server responds to each client message; default WebSocket route behavior.

Add CORS headers to environment headers

Adds CORS headers to all routes of a mock API with one click.

Automatic CORS preflight handling

Automatically answers OPTIONS preflight requests with a 200 status and CORS headers.

CRUD Routes

Generate multiple endpoints to perform CRUD operations on data buckets, with state persisting between calls.

Custom certificates

Provide your own certificate in PKCS12 or PEM format, with passphrase-protected keys and custom-trusted CA certificates.

Custom id Property

The id property name used to look up objects can be customized.

Data buckets

Persistent key-value stores linked to responses or used with the data helper.

Data file repair

Broken data file references are repaired on load: missing routes/folders removed, unlisted ones re-added to root.

Default Port 3000

New environments listen on port 3000 by default.

Desktop application

Cross-platform desktop app to create and run mock APIs.

Disable API prefix forwarding

Optionally remove the API prefix from the path sent to the proxied API.

Disable routes

Disable a route or folder in the app, or via CLI --disable-routes with UUID, name, or wildcard.

Disable TLS via CLI flag

Disable TLS at runtime with the --disable-tls flag when using the Mockoon CLI.

Disable TLS in serverless library

Set disableTLS: true when building a MockoonServerless instance to disable TLS.

Docker image

Docker image that runs the CLI.

Dynamic Data Generation

Use templating helpers and faker.js to generate dynamic user profiles, product catalogs, and business data.

Filtering, Sorting and Pagination

The main GET route supports filtering, searching, sorting and pagination.

Folders

Organize routes into folders and sub-folders with drag-and-drop, for a clearer route hierarchy.

Global variables

Store and share data between routes in the templating engine.

HTTP routes

Basic endpoints to mock any type of API, customizable with headers and body.

Multiple route responses

Define several responses per route with rules to handle different scenarios.

One-to-One streaming

Each client receives an independent set of streaming messages.

OpenAPI Import

Import OpenAPI specs to design and validate API contracts with stakeholders.

OpenAPI import/export

Import and export mock APIs in OpenAPI format.

OpenAPI support

Import and export OpenAPI specifications.

Parallel Development

Start frontend development without waiting for backend APIs to be ready.

Port and API Prefix Configuration

Change the port number and API prefix in Environment Settings.

Prototype User Experiences

Design and test user workflows with realistic API data before implementation.

Proxied response decompression

Automatically decompress gzip, deflate, brotli or Zstandard proxied response bodies when Content-Encoding is set.

Proxy headers

Add custom headers to forwarded requests and to responses received from the target API.

Proxy mode

Partial mocking by forwarding unmatched requests to a proxied server.

Query parameters

Query params are not part of route paths; retrieved via queryParam helpers and usable in rules.

Requests logging

Log incoming requests and see how Mockoon responded.

Request number rules

Answer differently based on the index of the requests.

Response rules

Response rules apply per client in one-to-one streaming; disabled in broadcast mode.

Temporarily disable routes

Disable routes or folders from the UI or CLI.

Route ordering

Control route precedence by ordering.

Route patterns and parameters

Supports Express 4 and 5 patterns: wildcards, optional params, optional groups and characters.

Multiple Responses and Rules

CRUD routes remain compatible with multiple responses and rules.

Routes order

Endpoints are created in the order they appear in the list, inside folders or not.

Routing

Routes are registered in display order; first match wins, with support for folders and reordering.

Serverless package

Wrapper around the core library for serverless deployments.

Streaming Modes

Support for one-to-one and broadcast streaming modes.

Templating

Dynamic responses using helpers, variables, and Faker.js.

TLS/HTTPS

Serve mock APIs over TLS using a custom certificate.

TLS serving

Serve mock APIs over TLS with a self-signed certificate by default, or provide your own PKCS12/PEM certificate and CA.

TLS Support

WebSocket routes automatically use secure wss:// when TLS is configured.

Secure WebSockets over TLS

WebSocket routes are served over wss:// when TLS is enabled on the mock server.

Validate API Contracts

Ensure API specifications meet frontend requirements before backend development.

WebSocket routes

Create WebSocket endpoints with configurable paths like /ws, /chat or /messages.

WebSockets

WebSocket endpoints available alongside HTTP routes.