Getting Started
Quickstart
MockBase gives you a live HTTPS endpoint you can point your app at, with configurable JSON responses, status codes, and conditional logic — no backend to write or deploy.
1. Create a mock
From the Dashboard, click New mock and give it a name, or click Create demo mock to start from a working example with a few sample routes already configured. Already have an OpenAPI spec for the API you're mocking? See Import & Export via OpenAPI — it turns the whole spec into routes in one step.
Every mock gets a unique base URL immediately:
https://mockbase.org/mock/<mock_id>2. Add a route
A route is one HTTP method + path pair (for example GET /users) with:
- a status code to return
- a response body — JSON in the built-in editor (drag its bottom-right corner to make the editing area bigger), raw XML for SOAP and other text payloads, or a binary file like a PDF or image
- an optional delay, for simulating slow networks
- optional conditional matching on query params, headers, the request body, a GraphQL operation name, or an element inside a SOAP envelope
Add as many routes as your mock needs. Routes can be reordered by dragging their grip handle in the sidebar, and duplicated from the route editor as a starting point for a variant.
MockBase supports the five methods you'd expect — GET, POST, PUT, PATCH, DELETE — and a fixed set of status codes covering the common cases: 200, 201, 202, 204, 301, 302, 304, 400, 401, 402, 403, 404, 409, 422, 429, 500, 502, 503, 504.
3. Call it
Point your app at the base URL plus your route's path:
GET https://mockbase.org/mock/<mock_id>/usersYou can also test it without leaving the browser: use the Try It panel to send a real request straight from the mock's page, with custom headers if you need them (press Ctrl/Cmd+Enter to send without touching the mouse), or click Get code for a ready-to-paste snippet — see Try It & Get Code for the full list of languages.
4. Watch it happen
Every request to your mock shows up live in the Request Inspector — method, path, status code, headers, the request body and the response body sent back, latency, and the responding client's IP — streamed over a WebSocket as it happens. Nothing to refresh, nothing to poll. Older requests stay browsable too: see Request Inspector.
A shortcut for the response body
Don't want to hand-type example values? Click Smart mock above the response body editor and MockBase fills every field with realistic fake data guessed from its name — email becomes a real-looking email address, created_at becomes a valid date, price becomes a decimal, and so on.
Making it behave like a real API
A mock that always returns 200 only tests the happy path. When you're ready for the rest:
- Chaos injection fails a share of requests, in shapes you choose — a slow timeout, a truncated body, an empty response.
- Rate limit simulation returns 429 after N requests, deterministically, so backoff logic is testable.
- Callouts let a route call you back, for standing in for an API that sends webhooks.
- A default response answers anything that matches no route, instead of a 404.
Made a mistake?
Every save is snapshotted automatically, so you can always see what a mock's routes looked like before your last few edits and roll back to any of them — see Version History.
Working with others
Building a mock as part of a team? Teams let everyone share the same mocks in a common workspace instead of passing around a mock id.
Before you sign in
Without an account, you can create 3 mocks with up to 10 routes each — enough to try MockBase out. Sign in and that mock (and everything on it) moves with you, with a much higher monthly request allowance. See Usage, Quotas & Plans for the full numbers.