How a MockFlow API Server Works
Define an Endpoint
Choose a method (GET, POST, PUT, PATCH, DELETE), set the path, and paste your response JSON. Add custom headers or a status code.
Get a Live HTTPS URL
MockFlow generates a permanent public URL like api.mockflow.io/my-project--abc/endpointId/users. Call it from your app immediately.
Switch Profiles on Demand
Toggle between Success, Error, Slow, and Unauthorized response profiles with one click. Your frontend immediately gets a different response for testing.
Use It From Any Frontend Framework
MockFlow endpoints are real HTTPS URLs. Call them exactly as you would call a real API.
React / fetch
// MockFlow URL for your /users endpoint
const API_BASE = "https://api.mockflow.io/my-project--abc123/endpointId";
async function getUsers() {
const res = await fetch(`${API_BASE}/users`);
const data = await res.json();
return data;
}
// MockFlow returns the exact JSON you configured:
// {
// "users": [
// { "id": 1, "name": "Alice", "role": "admin" },
// { "id": 2, "name": "Bob", "role": "user" }
// ]
// }Simulate a 401 Unauthorized
// Switch the active profile in MockFlow to "Unauthorized"
// Your frontend immediately receives:
// HTTP 401
// {
// "error": "Unauthorized",
// "message": "Token is missing or expired"
// }
// Test your auth redirect / error boundary without
// touching your real backend.Simulate Slow Responses
// Set a 2000ms delay on a response profile in MockFlow.
// Your fetch call will wait 2 seconds — perfect for
// testing loading states, skeleton screens, and timeouts.
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 3000);
const res = await fetch(url, { signal: controller.signal });
clearTimeout(timeout);What MockFlow Mock API Server Gives You
All HTTP Methods
GET, POST, PUT, PATCH, and DELETE — each endpoint handles a specific method with its own response.
Multiple Response Profiles
Define Success, Error, Not Found, Unauthorized, and any custom profile on the same endpoint. Switch between them instantly.
Custom Status Codes
Return any HTTP status code: 200, 201, 204, 400, 401, 403, 404, 422, 500. Ideal for testing every branch in your error handling.
Custom Response Headers
Add Content-Type, X-Request-ID, Cache-Control, or any custom header to any endpoint response.
Response Delays
Add a delay in milliseconds to simulate latency, slow networks, or timeouts.
CORS Enabled by Default
All endpoints include Access-Control-Allow-Origin: * by default so you can call them directly from any frontend origin without proxy setup.
Permanent Public URLs
Cloud endpoints have stable HTTPS URLs that work from any device, CI pipeline, or team member's machine.
JSON, XML, HTML, Text
Response body can be JSON, XML, HTML, or plain text. MockFlow sets the correct Content-Type automatically.
Who Uses a Mock API Server
Frontend Developers
Build UI features without waiting for the backend. Define exactly the response shape you need, work at full speed, then swap the URL for the real endpoint when it is ready.
QA & Testing Teams
Reproduce edge cases that are impossible to trigger reliably on staging — 500 errors, empty arrays, missing fields, malformed tokens. MockFlow makes them repeatable.
Mobile App Developers
iOS and Android apps need a stable API during development. A MockFlow server provides consistent responses without depending on a shared staging environment.
Developers Writing Tests
Integration tests that call real APIs are fragile and slow. Point them at a MockFlow server for deterministic, fast responses in every environment.
Mock API Server FAQ
What is a mock API server?
A mock API server is a hosted service that simulates real REST API endpoints. You define the path, method, response body, status code, headers, and optional delay. Any HTTP client — your frontend app, Postman, cURL — can call those URLs and get the configured response back, without any real backend.
When should I use a mock API server?
Use a mock API server when your backend is not ready yet, when you need to test edge cases like 500 errors or slow responses, or when you want to develop frontend features in isolation without depending on a staging server.
Does MockFlow require a backend or server setup?
No. MockFlow runs entirely in the cloud. You define your endpoints in the browser and get live HTTPS URLs immediately. Guest mode even works offline in the browser with simulated responses — no account required to start.
Can I simulate API errors and error responses?
Yes. Each endpoint supports multiple response profiles. Add a Success profile (200), an Error profile (500), an Unauthorized profile (401), and a Not Found profile (404). Switch between them with a single click to test how your app handles each case.
Can I simulate slow API responses?
Yes. Set a delay in milliseconds on any response profile or at the project level. This lets you test loading states, skeleton screens, timeouts, and retry logic without any real network latency.
Can I use MockFlow with React, Next.js, or other frameworks?
Yes. MockFlow endpoints are real HTTPS URLs with CORS enabled by default. Fetch them from any React component, Vue app, Angular service, or any frontend framework using the standard Fetch API or Axios.
Is MockFlow free?
Yes. The Standard plan is free and includes cloud mock endpoints with public URLs. Guest mode is completely free without an account and stores everything locally in your browser.