add_route_response
Add a conditional response to an API route, triggered by rules based on request properties like headers, body, or query parameters.
Instructions
Add a new conditional or alternative response to an existing route. Use rules to define when this response is activated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environmentId | Yes | Environment UUID | |
| routeId | Yes | Route UUID | |
| statusCode | No | HTTP status code | |
| body | No | Response body (plain text or JSON string) | |
| label | No | Label for this response (optional) | |
| contentType | No | Content-Type header value | application/json |
| headers | No | Additional headers (excluding Content-Type) | |
| rules | No | Activation rules for this response | |
| rulesOperator | No | Logical operator between rules | OR |
| isDefault | No | Mark this response as the default (demotes all others) |