Response ModifyFull Mock Body• 5 min read

How to Mock API Responses with Synthetic JSON Payloads

Summary: Intercept any network call and return a custom synthetic JSON payload immediately without sending traffic to the remote backend.

Why This Rule Matters for Developers & QA

Backend APIs are frequently in development or down in staging environments. Synthetic response mocking enables frontend, mobile, and TV engineers to unblock development and verify UI states.

Step-by-Step Implementation Guide

1

Identify Endpoint to Mock

Enter the endpoint URL pattern (e.g. `*/api/v1/subscription/status`).

2

Paste Synthetic JSON Body

Provide the complete JSON payload that you want the application to receive, including nested objects and arrays.

3

Verify UI Rendering

Reload your app. Your UI immediately renders the mock data, showing active premium states, error banners, or user profiles.

Configuration Snippet

How to Mock API Responses with Synthetic JSON Payloads — proxyceptor-rule.json
JSON
{
"id": "rule_mock_vip_subscription",
"pattern": "*/api/v1/subscription/status",
"action": "mock-response",
"responseStatus": 200,
"responseBody": {
"plan": "VIP_PREMIUM_ANNUAL",
"status": "ACTIVE",
"features": ["4K_HDR", "DOLBY_ATMOS", "UNLIMITED_STREAMS"],
"expires_at": "2030-12-31T23:59:59Z"
},
"enabled": true
}

Frequently Asked Questions

Explore More Debugging Guides

Redirect / Rewrite
URL Modify & Redirect
4 min read
JSON Deep Merge
Payload Modify & Deep Merge
5 min read
Inject Headers
Request Header Modify
4 min read