Mock JSON Data

Documentation

Build your first mock API.

Create realistic GET endpoints for frontend development, testing, demos, and integrations—without waiting for a backend.

01

Create an API

Open the dashboard and give your API a clear name.

02

Add a GET resource

Create a route such as GET /users or GET /users/:id and add custom JSON.

03

Call your protected endpoint

Use the highlighted /api/{your-api}/... URL with your X-API-Key header.

Make a request

Your endpoint URL follows this format:

GET https://mock-json-data.vercel.app/api/demo-123456
X-API-Key: mjd_your_api_key

{
  "status": 200,
  "success": true,
  "message": "Request successful",
  "data": {},
  "timestamp": "{{datetime}}"
}

Fast, secure, easy

Use your API key on every request

Create an API key in the dashboard workspace panel. The same key protects every API you create. Include it with every public request to keep your mock data private.

curl https://mock-json-data.vercel.app/api/demo-123456 \
  -H "X-API-Key: mjd_your_api_key"

You can also use Authorization: Bearer mjd_your_api_key. Header names are case-insensitive, but the API-key value is case-sensitive. Requests without a valid key return 401.

Scenarios

Switch responses with ?scenario=empty or the X-Mock-Scenario header. Mock responses can include dynamic values such as UUIDs, dates, request fields, route parameters, and query values.

API key security

Generate one key per user and send it with every public request using X-API-Key or Bearer authentication.

Dynamic values

Use templates such as {{uuid}}, {{request.name}}, and {{params.id}}.

Browser-ready

Public mocks include CORS support and safe request logging.

30-day retention

Mock APIs are automatically removed after 30 days.

Request logs

Review recent requests, response statuses, latency, and the endpoint that was called from your dashboard.