Mock servers
An API that’s ready
before the API is.
Spin up a local mock server, describe the routes your app needs, and build the frontend or integration now. Make responses dynamic with request data and add latency per route.
- VS Code today
- Desktop: coming soon
- Free, no request quota
Mock servers
Ship the frontend
before the backend.
Spin up a local mock server in seconds. Define routes, status codes, headers and response delays, and make responses dynamic with request data.
- Path parameters like
/users/:id - Templates from the incoming request:
{{params.id}},{{query.page}},{{headers.authorization}} - Simulated latency per route
- A live log of every request that hits it
VS Code + Desktop — not available in the web app
Routes
Status
201
Delay
0 ms
Content-Type
application/json
Response body
{ "id": "usr_{{query.seed}}", "created": true} Status
200
Delay
300 ms
Content-Type
application/json
Response body
{ "id": "{{params.id}}", "name": "Ada Lovelace", "locale": "{{query.locale}}"} Status
200
Delay
120 ms
Content-Type
application/json
Response body
[ { "sku": "VOY-001", "price": 49 }, { "sku": "VOY-002", "price": 99 }] Request log live
- GET /users/42?locale=en-GB 200 302 ms
- POST /users?seed=7 201 4 ms
- GET /products 200 124 ms
- GET /users/7 200 301 ms
Anatomy of a route
- Method
- GET, POST, PUT, PATCH, DELETE …
- Path
- Static or with parameters, e.g. /users/:id
- Status
- Any HTTP status code
- Headers
- Any response headers; JSON content type is set for you when the body is JSON
- Body
- Any text — with template placeholders
- Delay
- Milliseconds to wait before responding
Template placeholders
- {{params.id}}
- A path parameter from a route like /users/:id
- {{query.page}}
- A query-string value from the incoming request
- {{headers.authorization}}
- A header from the incoming request (lower-case name)
Mock server questions
Is the mock server available in the web app?
No. A browser tab can’t listen on a network port, so mock servers run in the VS Code extension today, and in the desktop app once it’s released.
Can a mock response use data from the request?
Yes. Use {{params.name}}, {{query.name}} and {{headers.name}} placeholders in the response body or headers. A placeholder that doesn’t match anything renders as an empty string instead of breaking the route.
Can I simulate a slow API?
Yes. Each route has its own delay in milliseconds, so you can test loading states and timeouts.
Does it cost anything?
No. Mock servers are free, with no request quota.