ForHosting KIT · Developer Utilities

Reshape a webhook payload

The email found at data.customer.email lands under correo and the amount 8500 under importe, while a path that does not exist is simply left out: describe the shape the receiving system expects and get the message rebuilt to match. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

Runs in your browser. Free, unlimited — your data never leaves this page.

Two systems that both call themselves 'integrated' rarely agree on field names, nesting or even date formats.

Why two systems rarely agree on shape

Two systems that both call themselves integrated rarely agree on names, nesting or even date formats. A payment processor sends the amount in cents as a whole number while your billing system expects it as decimal text nested three levels deep. A CRM fires a new-lead event as a flat object while your marketing tool wants a list of contacts, even when there is only one. These are not bugs; they are two teams making different, reasonable decisions independently, and the mismatch is exactly what breaks integrations that looked fine in a demo. This tool sits between them and rebuilds what one sends into the structure the other expects, without either side changing its own code.

A mapping instead of hand-written glue

You describe the target shape with a mapping. Each name in the result points to the dotted path where its value sits in the incoming message: in the example, correo points to data.customer.email and importe to data.amount, so the amount 8500 lands under importe. A path that does not exist, such as data.no.existe, is left out rather than filled with an invented value. Keeping that mapping outside your application matters: hand-written transforms get forgotten and break quietly when the source changes a name months later, while a separate mapping can be inspected and checked on its own. A service with dozens of partners can keep one mapping per partner and onboard a new one without touching shared code.

The mismatch that breaks integrations

A CRM fires a lead.created event with a flat object; your marketing tool wants an array under contacts even when there's only one. These aren't bugs — they're just two teams making different, reasonable decisions independently, and the resulting mismatch is exactly what breaks integrations that looked fine in a demo.

Why this sits outside your application code

Hand-writing a transform function for every partner integration means that function lives inside your application, gets forgotten, and breaks quietly when the source system changes a field months later with no warning. Running the transform as an external, addressable step means the mapping logic is inspectable and testable on its own, separate from the business logic that consumes the result — and separate from whichever team owns the sending system.

Multi-tenant partner integrations

A platform with dozens of partner integrations keeps one mapping per partner so onboarding a new one never requires touching shared application code.

How do I describe the shape I want?

Use a mapping. For each name in the result, give the dotted path where the value sits in the incoming message. In the example, importe points to data.amount, so the 8500 found there appears under importe in the result.

What happens if a path in the mapping does not exist?

That entry is simply missing from the result instead of being filled with an invented value. In the example, falta points to data.no.existe, which is not in the source, so the result only contains correo and importe.

What kinds of changes can a mapping make?

It can rename values, move them between nesting levels, convert their type and turn a flat message into a nested one or the other way round, all from the mapping you provide with each message.

Why keep the transformation outside my application?

A transform hand-written inside the application tends to be forgotten and breaks quietly when the source changes months later. Kept outside, the mapping can be inspected and checked on its own, and a new partner only needs a new mapping, not a new deployment.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/dev/webhook-transform

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/dev/webhook-transform \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"payload":{"user":{"name":"Ada"}},"mapping":{"nombre":"user.name"}}'
{
  "payload": {
    "user": {
      "name": "Ada"
    }
  },
  "mapping": {
    "nombre": "user.name"
  }
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "dev.webhook_transform",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This endpoint sits between them and reshapes the payload one sends into the exact structure the other expects, without either side changing a line of its own code.

The mismatch that breaks integrations

A payment processor sends amount_cents as an integer; your billing system expects amount as a decimal string nested three levels under totals.charge.

How the transformation runs

Send POST /dev/webhook-transform with the incoming payload and a mapping that describes the target shape — which source fields go where, any renames, type conversions or nested restructuring needed. The task returns a task_id immediately and runs the transformation in the background, so a slow or malformed payload never blocks the request that sent it. The reshaped payload arrives by a signed webhook call to your endpoint or waits behind a signed link valid for 24 hours.

Where it fits a wider automation

Teams that receive webhooks from several vendors — a payment processor, a CRM, a support desk — end up needing a small transform for each one before that data can land in one internal event format. Chaining this endpoint in front of an internal queue means new vendors can be onboarded by writing a mapping, not a deployment, and because pricing is a flat per-request fee with no charge on failure, testing a new mapping against real sample payloads costs nothing to get wrong the first few times.

Payment provider normalization

A marketplace accepts webhooks from several payment providers and transforms each one into a single internal charge event before it reaches the order pipeline.

CRM to marketing automation bridge

A sales tool sends lead events in its own schema, and this endpoint reshapes them into the exact structure a marketing automation platform's API expects.

Legacy system field renaming

An older internal system uses cryptic abbreviated field names, and incoming webhooks are transformed into readable, documented field names before storage.

How do I transform a webhook payload with this API?

POST the incoming payload and a field mapping to /dev/webhook-transform, keep the returned task_id, and receive the reshaped payload by webhook or a signed link valid for 24 hours.

Is the webhook transformer API free?

No, there is no free tier or trial; it costs a flat $0.002 per request, and a failed transform is never charged.

What kind of transformations can it handle?

Field renames, type conversions, nested restructuring, and reshaping between flat and nested formats, based on the mapping you provide with the request.

Does it work with any payload format?

It works with structured JSON payloads, which cover the overwhelming majority of webhook traffic between modern systems.

Can I reuse the same mapping for many payloads?

Yes, most integrations submit the same mapping definition with every incoming payload from a given source, which is exactly how a stable partner integration is meant to work.

Can I transform payloads in bulk?

Yes, submit one async task per payload, or batch several through your own queue, and collect each result by webhook as it completes.

What happens if a field is missing from the source payload?

The transform applies the mapping to whatever fields are actually present; missing source fields simply produce missing target fields rather than a fabricated value.

Is this endpoint live?

Yes, /dev/webhook-transform is live and accepting requests now.

Read the full KIT documentation →