Preview a rule against a sample

Validates the rule, then runs it against a saved request (sampleRequestId, any endpoint in your workspace) or an inline sampleRequest. Returns the delivery as it would go out plus a note per step. Nothing is saved; available on every plan, so a rule can be built before upgrading. This is the iteration loop for an LLM: validate, preview, adjust, then PUT.

POST
/api/v1/transformations/preview
AuthorizationBearer <token>

API key in the Authorization header: Authorization: Bearer wv_live_…. Keys are created on the API keys page in the app, shown once, and scoped to your workspace. X-Api-Key: wv_live_… is accepted as a fallback for tools that can't set Authorization.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

{
  "matched": true,
  "sampleRequestId": 0,
  "output": {
    "headers": {
      "property1": "string",
      "property2": "string"
    },
    "body": "string",
    "contentType": "string",
    "queryString": "string"
  },
  "steps": [
    {
      "index": 0,
      "op": "string",
      "applied": true,
      "note": "string"
    }
  ],
  "note": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}

On this page