---
title: "Payload shaping event"
method: POST
path: "payload-shaping"
tags: ["Webhooks"]
---

# Payload shaping event

`POST payload-shaping` (webhook)

Delivered when a `payload_shaping` function applies its JMESPath expressions to reshape an input payload. The reshaped result is in `transformedContent`.

For signing-secret setup and retry semantics that apply to every variant, see the [Webhooks overview](/api/v3/webhooks).

## Payload

- PayloadShapingEvent — Emitted by `payload_shaping` functions, which restructure JSON payloads using JMESPath expressions configured on the function. The shaped result is carried in `transformedContent`.
  - `functionCallTryNumber` integer — The attempt number of the function call that created this event. 1 indexed.
  - `eventID` string, required — Unique ID generated by bem to identify the event.
  - `createdAt` string, date-time — Timestamp indicating when the event was created.
  - `referenceID` string, required — The unique ID you use internally to refer to this data point, propagated from the original function input.
  - `inboundEmail` EventInboundEmail
    - `to` string, required — The email address of the recipient.
    - `deliveredTo` string — The email address of the original intended recipient if the email itself was forwarded.
    - `from` string, required — The email address of the sender.
    - `subject` string, required — The subject of the email.
  - `metadata` object
    - `durationFunctionToEventSeconds` number
  - `eventType` 'payload_shaping'
  - `functionCallID` string — Unique identifier of function call that this event is associated with.
  - `functionID` string, required — Unique identifier of function that this event is associated with.
  - `functionName` string, required — Unique name of function that this event is associated with.
  - `functionVersionNum` integer — Version number of function that this event is associated with.
  - `callID` string — Unique identifier of workflow call that this event is associated with.
  - `workflowID` string — Unique identifier of workflow that this event is associated with.
  - `workflowName` string — Name of workflow that this event is associated with.
  - `workflowVersionNum` integer — Version number of workflow that this event is associated with.
  - `transformedContent` object, required — The reshaped payload produced by applying the function's JMESPath expressions to the input data.

## Acknowledgement `2XX`

Return any 2XX status code to acknowledge receipt. The exact code is not inspected.

---

[API](https://skmtc.net/bem-team/apis/bem-api.md) · [All operations](https://skmtc.net/bem-team/apis/bem-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bem-team/bem-api/versions/b0a6debb3458/schema)
