AI Features

AI Transforms

Transform webhook payloads using natural language rules. Mitte compiles your description into a JSONata expression applied to every delivery.

Mitte lets you transform webhook payloads before they reach your target URL. Describe the transformation in plain English, and Mitte uses GPT-4o-mini to compile it into a JSONata expression that runs on every delivery.

How It Works

Describe Your Rule

Write a natural language rule (max 500 characters) describing how you want the payload transformed. For example:

Extract only the event type, customer email, and total amount from Stripe checkout webhooks

AI Compilation

Mitte sends your rule to GPT-4o-mini, which generates a JSONata expression. The expression is validated (parsed) before saving to ensure correctness.

Automatic Application

On every webhook delivery, Mitte evaluates the JSONata expression against the incoming payload. The transformed result becomes the body forwarded to your target URL.

Setting Up a Transform

  • Dashboard: Open the endpoint detail page → click Transform → enter your natural language rule → click Save. Mitte will compile and validate the JSONata expression.
  • API: Send a PUT request to /api/v1/endpoints/:id/transform with { "rule": "your natural language rule" }.

Graceful Degradation

If a transform fails at delivery time (e.g., the payload structure doesn't match the JSONata expression), Mitte sends the original payload instead. This ensures webhooks are never lost due to a transform error.

The delivery headers indicate the transform status:

Header ValueMeaning
X-Mitte-Transform: appliedTransform was successfully applied.
X-Mitte-Transform: failedTransform errored; original payload was sent.

The transformed body is stored in the delivery log (truncated to 5,000 characters) for inspection.

Removing a Transform

  • Dashboard: Open the endpoint detail page → click Transform → click Remove.
  • API: Send a DELETE request to /api/v1/endpoints/:id/transform.

Daily Limits

PlanAI Transforms / Day
Free3
Pro50

These limits apply to creating or updating transform rules (the AI compilation step). Once a rule is saved, it runs on every delivery with no additional quota cost.

Example

Input payload (from Stripe):

{
  "id": "evt_1234",
  "type": "checkout.session.completed",
  "data": {
    "object": {
      "customer_email": "[email protected]",
      "amount_total": 4999,
      "currency": "usd"
    }
  }
}

Rule: Extract event type, customer email, and amount in dollars

Transformed output:

{
  "event": "checkout.session.completed",
  "email": "[email protected]",
  "amount": 49.99
}
JSONata is a powerful query and transformation language for JSON. Learn more at jsonata.org.