v36

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0187270483.0 KB
Webhooks

Extract event

Delivered when an extract function completes processing of a document and produces structured JSON. The body's transformedContent matches the function's outputSchema.

For signing-secret setup and retry semantics that apply to every variant, see the Webhooks overview.

postWebhookextract

Payload

functionCallTryNumberinteger

The attempt number of the function call that created this event. 1 indexed.

eventIDstring required

Unique ID generated by bem to identify the event.

createdAtstring date-time

Timestamp indicating when the event was created.

referenceIDstring required

The unique ID you use internally to refer to this data point, propagated from the original function input.

eventType'extract'
functionCallIDstring

Unique identifier of function call that this event is associated with.

functionIDstring required

Unique identifier of function that this event is associated with.

functionNamestring required

Unique name of function that this event is associated with.

functionVersionNuminteger

Version number of function that this event is associated with.

callIDstring

Unique identifier of workflow call that this event is associated with.

workflowIDstring

Unique identifier of workflow that this event is associated with.

workflowNamestring

Name of workflow that this event is associated with.

workflowVersionNuminteger

Version number of workflow that this event is associated with.

inputType'csv' | 'docx' | 'email' | 'heic' | 'html' | '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.

transformationIDstring

Unique ID for each transformation output generated by bem following Segment's KSUID conventions.

s3URLstring nullable

Presigned S3 URL for the input content uploaded to S3.

transformedContentobject required

The transformed content of the input. The structure of this object is defined by the function configuration.

invalidPropertiesstring[]

List of properties that were invalid in the input.

itemOffsetinteger required

The offset of the first item that was transformed. Used for batch transformations to indicate which item in the batch this event corresponds to.

itemCountinteger required

The number of items that were transformed. Used for batch transformations to indicate how many items were transformed.

fieldBoundingBoxesobject

Per-field bounding boxes. A JSON object mapping RFC 6901 JSON Pointer paths (e.g. "/invoiceNumber", "/items/0/price") to the document regions from which each extracted value was sourced.

fieldConfidencesobject

Per-field confidence scores. A JSON object mapping RFC 6901 JSON Pointer paths (e.g. "/invoiceNumber") to float values in the range [0, 1] indicating the model's confidence in each extracted field value.

avgConfidencenumber float nullable

Average confidence score across all extracted fields, in the range [0, 1].

Response

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