How shaping works
Shaping is an optional configuration attached to a proxy rule. When GoDizzy receives the upstream response it applies your shaping config in this order:- Override the status code (if configured)
- Set or remove response headers
- Transform the body
Shaping configs are versioned the same way mock responses are — every save creates a new version, and you can view history and revert to any prior version.
Override the status code
Enter a replacement HTTP status code in the Status code override field. GoDizzy discards the upstream status and returns yours instead. Leave the field empty to pass the upstream status through unchanged. Example use case: Your staging upstream always returns200 for payment endpoints because the test environment never fails. Override to 402 to test how your agent handles a payment-required response without changing the upstream.
Set and remove headers
In the Headers section of your shaping config, you can add header operations:- Set — Adds the header to the response (or replaces it if the upstream already sent it). Provide a
setobject mapping header names to values. - Remove — Strips the named header from the upstream response before returning it. Provide a
removearray of header names.
{{$reqBody['key']}} and {{$resBody['key']}}) work in header values — see Template variables below.
Transform the body
- Unchanged (pass-through)
- Full replace
- JSON field patch
The default. GoDizzy returns the upstream body exactly as received. Select this mode when you only need to modify the status code or headers.
Template variables
Proxy response shaping supports the same template variables as mock responses, plus one additional context: the upstream response body.| Syntax | Available in | Description |
|---|---|---|
{{$randomUUID}} | Body, headers | New UUID per response |
{{$isoTimestamp}} | Body, headers | UTC timestamp at response time |
{{$unixSeconds}} | Body, headers | Unix epoch seconds |
{{$unixMs}} | Body, headers | Unix epoch milliseconds |
{{$date}} | Body, headers | YYYY-MM-DD in UTC |
{{$randomInt(a,b)}} | Body, headers | Random integer in range |
{{$randomAlphaNumeric(n)}} | Body, headers | Random alphanumeric string |
{{$randomBoolean}} | Body, headers | true or false |
{{$randomHex(n)}} | Body, headers | Random hex string |
{{$reqBody['key']}} | Body only | Top-level field from the incoming request JSON body |
{{$resBody['key']}} | Body only | Top-level field from the upstream response JSON body |
{{$reqBody['key']}} is only available when the rule’s method is POST, PUT, or PATCH. {{$resBody['key']}} is only available in Full replace and JSON field patch body transforms — not in headers.Version history and rollback
Every time you save a proxy shaping config, GoDizzy stores a new immutable version — identical to how mock response versioning works.Open version history
On the rule detail page, click View History on the proxy shaping section. You will see a list of every saved config with the timestamp and the email of the team member who saved it.
Inspect a version
Click any version to see the full config: status override, header operations, and body transform mode and payload.
Example: normalize an inconsistent upstream
Your staging upstream returns auser object, but your production upstream wraps it in a data envelope. Use a full replace shaping config on the staging proxy rule to make staging return the same shape as production:
data.id, data.email, and data.plan — regardless of which environment is serving the request.