Configure a mock response
1
Open your route collection
In the dashboard, navigate to Routes, select your environment, and open the route collection that contains the rule you want to configure.
2
Create or select a routing rule
Click Add Rule to create a new rule, or click an existing rule to edit it. Set the HTTP method and path pattern for the rule to match (for example,
POST and /api/search).3
Set the action to Mock
In the rule editor, set the Action to Mock. If the rule was previously set to Proxy, the toggle on the rule card also switches between the two modes — flip it to enable mocking without opening the full editor.
4
Enter the status code
Enter the HTTP status code GoDizzy should return. Use any valid code:
200 for success, 429 for rate-limit simulation, 500 for error scenarios, and so on.5
Add response headers (optional)
Provide response headers as a JSON object. Each key is a header name and each value is the header value string.
Template variables such as
{{$randomUUID}} work in header values. See the Template variables section below for the full list.6
Write the response body
Enter the response body as a JSON string. This is the exact payload GoDizzy returns to the caller.
7
Set the latency range
Enter a Min latency (ms) and Max latency (ms). GoDizzy picks a random value in that range before responding. Set both to
0 for an immediate response. See the Latency Injection guide for more detail.8
Save
Click Save. GoDizzy creates a new version of the mock response. Your previous configuration is preserved in version history and can be restored at any time.
Template variables
Mock response bodies and headers support template placeholders that GoDizzy expands at response time. You can reference random values, timestamps, and fields from the incoming request body.Random values
Random values
Time and date
Time and date
Request body fields
Request body fields
{{$reqBody['key']}} expands to the value of a top-level field in the incoming JSON body. A missing key or a non-JSON body expands to JSON null.Switching between mock and proxy
You do not need to open the rule editor to switch a rule’s behavior. Each rule card has a toggle in the rule list view:- Toggle on (Mock) — GoDizzy returns the configured mock response.
- Toggle off (Proxy) — GoDizzy forwards the request to the collection’s target endpoint.
Version history and rollback
Every time you save changes to a mock response, GoDizzy creates a new immutable version. Your previous configuration is never overwritten.1
Open version history
On the rule detail page, click View History. The history panel lists every version with the timestamp and the email address of the team member who made the change.
2
Inspect a prior version
Click any version to view its full configuration: status code, headers, body, and latency range.
3
Revert
Click Revert to this version on the version you want to restore. GoDizzy creates a new version with the content of the selected prior version — it does not delete the intervening history.
Example: simulating a rate-limited response
429 and configure a latency range of 200–800 ms to simulate a realistic throttled API response your agent needs to handle gracefully.