Intercept, mock, and tunnel
APIs without friction.
Everything you need to capture live webhook payloads, synthesize dynamic JSON/XML responses, and bridge remote HTTP requests directly to your local development server.
Quickstart & Workspace Tiers
Every workspace on MockiFlo provisions an isolated public subdomain (https://{subdomain}.mockiflo.com) paired with a real-time Console Radar. You can start immediately as an anonymous guest or sign in for longer retention and local tunnel access.
| Capability | Guest (No Login) | Free Account | Pro Plan |
|---|---|---|---|
| Workspace TTL | 10 minutes | 8 hours | Permanent (No expiry) |
| Subdomain Naming | Auto-generated | Auto-generated | Custom Subdomain |
| Local Reverse Tunnel | Requires sign-in | Included | Included |
| Max Delay Simulation | Up to 60s | Up to 60s | Up to 10 mins (600s) |
Click Launch on the homepage to generate a workspace, then send any HTTP request to your assigned subdomain:
curl -X POST https://your-workspace.mockiflo.com/webhooks/stripe \
-H "Content-Type: application/json" \
-d '{"event": "payment_intent.succeeded", "amount": 4900}'
Live HTTP Traffic Inspector
Every incoming HTTP request (GET, POST, PUT, PATCH, DELETE) hitting your subdomain is streamed instantaneously to your open Console Radar over Server-Sent Events (SSE).
Inspect HTTP method, path, query string parameters, request headers, client metadata, and raw or formatted payloads.
Structured JSON and XML payloads are automatically highlighted and foldable so you can navigate deeply nested webhook events.
Turn any captured inbound request directly into a reusable Mock Rule from the console drawer without retyping paths.
Mock Rules & Current Limitations
When no rule matches an incoming request (and no tunnel is connected), MockiFlo responds with a default 200 OK acknowledgment. Open Mock Rules in your console to define custom synthetic endpoints.
Supported Condition Matchers
| Matcher Type | Example Pattern | Behavior |
|---|---|---|
| Exact Path | /api/v1/checkout | Matches the exact normalized request path. |
| Prefix (Starts With) | /api/v1/users/ | Matches any route beginning with the specified prefix. |
| Substring (Contains) | webhook | Matches if the path contains the target substring. |
| RegEx Pattern | ^/orders/[0-9]+$ | Evaluates standard regular expressions against the path. |
| Query Parameter | status=failed | Matches incoming requests containing the target query key/value. |
Priority order: Recently updated active rules are evaluated first. Use the Active switch on any rule to toggle it on or off without deleting it.
Each mock rule currently lets you configure:
- HTTP Status Code: Any valid status code from
100to599(e.g.,200,201,401,429,503). - Latency Delay: Millisecond (
ms) or second (s) response delay. - Content-Type & Response Body:
application/json,application/xml,text/html, ortext/plain(up to 512 KB, static or dynamic template).
Note: Custom HTTP response headers (such as custom X-* or Set-Cookie headers) are not yet supported on mock rules and are planned for an upcoming release.
Dynamic Response Template Syntax
MockiFlo includes a built-in interpolation engine that works across JSON, XML, and plain text payloads. Generate realistic IDs, timestamps, or echo fields directly from the incoming request body, query params, and headers.
1. Built-in Dynamic Generators
| Token / Function | Output Type | Sample Output |
|---|---|---|
{{ $uuid }} |
UUID v4 (String) | 01a167be-492b-711f-9a10... |
{{ $timestamp }} |
Epoch Seconds (Number) | 1794603600 |
{{ $timestamp_ms }} |
Epoch Millis (Number) | 1794603600189 |
{{ $time('%Y-%m-%d %H:%M:%S') }} |
Formatted Datetime (String) | 2026-11-14 01:30:00 |
{{ $random_int(1000, 9999) }} |
Bounded Random (Number) | 5428 |
{{ $random_str(8) }} |
Random Alphanumeric (String) | xI12uM9K |
2. Request Context Extraction
- req.body.* — Reads JSON fields or XML tags/attributes (e.g.
{{ req.body.customer.name }},{{ req.body.order.@id }}). - req.query.* — Reads URL query parameters (e.g.
{{ req.query.search }}). - req.headers.* — Reads HTTP headers case-insensitively (e.g.
{{ req.headers.authorization }}).
3. Transformers & Array Slicing
{{ $upper(req.body.name) }}→ Uppercase string{{ $lower(req.headers.auth) }}→ Lowercase string{{ $split(req.body.name, ' ')[0] }}→ Split & pick index{{ req.body.tags[0:2] }}→ Exclusive array slice
Tokens render AS-IS without stripping quotes: omit quotes around numbers or booleans ("score": {{ req.body.score }}), and wrap string values in quotes ("id": "{{ $uuid }}"). Unquoted missing values evaluate to null, while quoted missing values fall back to "".
{
"transaction_id": "{{ $uuid }}",
"processed_at": "{{ $time('%Y-%m-%dT%H:%M:%SZ') }}",
"epoch": {{ $timestamp }},
"customer": "{{ $upper(req.body.customer.name) }}",
"reference_code": "{{ $random_str(10) }}",
"status": "approved"
}
Need a starting template fast? Open the Dynamic Response Playground and click Import cURL. It parses your query params, headers, and payload into the request context, then generates a matching JSON or XML template—with checkboxes to ignore headers, params, or body fields you don't want echoed back.
Local Reverse Tunneling (CLI)
Bridge any local service port (such as localhost:5000 or localhost:8080) directly to your public MockiFlo subdomain over a duplex WebSocket connection—no router port-forwarding or public IP required. Available on all signed-in accounts (Free & Pro).
Step 1: Install the MockiFlo CLI
curl -fsSL https://raw.githubusercontent.com/raflsspace/mockiflo/main/install.sh | bash
irm https://raw.githubusercontent.com/raflsspace/mockiflo/main/install.ps1 | iex
Step 2: Authenticate & Start Tunnel
Open your workspace console and click Tunnel in the top bar to copy your personal API token, then run:
# 1. Authenticate once with your personal API token mockiflo login YOUR_API_TOKEN # 2. Forward remote traffic to your local port (e.g. 5000) mockiflo tunnel 5000 -s your-subdomain # Or run as a single command without saving credentials: mockiflo tunnel 5000 -s your-subdomain -t YOUR_API_TOKEN
To terminate an active session, press Ctrl + C in your terminal or click Force Disconnect inside the Console Tunnel modal.
MockiFlo lets you mix live local backend services with cloud-hosted mock endpoints on the exact same subdomain using the per-rule Tunnel switch inside Create / Edit Mock Rule:
By default when the CLI tunnel is connected—or when a rule's Tunnel toggle is switched ON—requests pass straight through to localhost:{port} while still appearing in your live SSE traffic stream.
Keep a rule Active with its Tunnel toggle switched OFF to intercept that specific path in the cloud with a mock response, while all other routes continue forwarding to your local backend.
Latency & Fault Simulation
Verify how your frontend, mobile client, or background worker behaves under degraded network conditions without modifying application code:
- Precision Delays: Set Latency Delay in milliseconds (
ms) or seconds (s) on any cloud mock rule to test loading states, retry backoffs, and HTTP client read timeouts (up to 60s on Guest/Free and 600s / 10 mins on Pro). - HTTP Error & Rate-Limit Emulation: Combine realistic delays with non-2xx status codes (
400,401,429,500,504) and dynamic error payloads to validate circuit breakers and fallback UIs.
Traffic Data & Ephemeral Streaming
Traffic hitting your mock endpoints—as well as requests and responses passing through your local reverse tunnel—is handled strictly as an in-memory live stream. MockiFlo does not write captured request/response payloads, headers, or query parameters to disk or a persistent database; once pushed to your open Console Radar over SSE, that traffic data is not kept on the server.
- Lower Overhead: Skipping database writes for every mock hit or tunnel round-trip keeps routing lightweight and latency low.
- Better Payload Privacy: Webhook payloads, auth tokens, and local tunnel responses stay transient in your active browser session instead of sitting in stored request logs.
- No Historical Traffic Log: Refreshing or closing the console tab clears the visible stream—past mock or tunnel requests cannot be pulled back from the server.
- Persisted Configuration: Only your account profile (username/email), workspace metadata, mock rules, and usage quotas are stored according to your tier's TTL.