---
title: "Parse event"
method: POST
path: "parse"
tags: ["Webhooks"]
---

# Parse event

`POST parse` (webhook)

Delivered when a `parse` function renders a document into a navigable structure of sections, entities, and relationships. The full parsed structure is in `transformedContent`.

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

## Payload

- ParseEvent — Emitted when a `parse` function completes. Reuses the `extract` event shape on the wire — both wrap a Transformation and downstream consumers care about the same `transformedContent` payload — but uses a distinct `eventType` discriminator so receivers can dispatch on the function type that produced it.
  - `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` 'parse'
  - `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.
  - `inputType` 'csv' | 'docx' | 'email' | 'heic' | 'html' | 'jfif' | 'jpeg' | 'json' | 'heif' | 'm4a' | 'mov' | 'mp3' | 'mp4' | 'pdf' | 'png' | 'pptx' | 'text' | 'wav' | 'webp' | 'xls' | 'xlsx' | 'xml' — The input type of the content you're sending for transformation. `jfif` is accepted as an alias for `jpeg` — JFIF is the same format under a different extension — and is normalized to `jpeg`, so responses and webhooks report `jpeg` for a JFIF upload. The undeclared alias `jpg` behaves the same way.
  - `transformationID` string — Unique ID for each transformation output generated by bem following Segment's KSUID conventions.
  - `s3URL` string, nullable — Presigned S3 URL for the input content uploaded to S3.
  - `inputs` object[], nullable — Array of parse inputs with their types and S3 URLs.
    - `inputType` string, nullable
    - `inputContent` string, nullable
    - `jsonInputContent` object, nullable
    - `s3URL` string, nullable
  - `transformedContent` object, required — The parsed content of the input. Top-level keys are `sections`, `entities`, and `relationships`; the precise shape is determined by the parse function's configuration.
  - `correctedContent` union — Corrected feedback provided for fine-tuning purposes.
    - object
      - `output` AnyType[]
        - union
          - object
          - unknown[]
            - unknown
          - string
          - number
          - integer
          - boolean
    - union
      - object
      - unknown[]
        - unknown
      - string
      - number
      - integer
      - boolean
  - `invalidProperties` string[] — List of properties that were invalid in the input.
  - `itemOffset` integer, required — The offset of the first item that was parsed. Used for batch parsing to indicate which item in the batch this event corresponds to.
  - `itemCount` integer, required — The number of items that were parsed. Used for batch parsing to indicate how many items were parsed.
  - `fieldBoundingBoxes` object — Per-field bounding boxes. A JSON object mapping RFC 6901 JSON Pointer paths to the document regions from which each parsed value was sourced.
  - `fieldConfidences` object — Per-field confidence scores. A JSON object mapping RFC 6901 JSON Pointer paths to float values in the range [0, 1] indicating the model's confidence in each parsed field value.
  - `avgConfidence` number, float, nullable — Average confidence score across all parsed fields, in the range [0, 1].

## Acknowledgement `2XX`

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

---

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