---
title: "Collection processing event"
method: POST
path: "collection-processing"
tags: ["Webhooks"]
---

# Collection processing event

`POST collection-processing` (webhook)

Delivered when a batch add or update against a Collection finishes. Reports how many items were processed and lists the IDs that were touched.

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

## Payload

- CollectionProcessingEvent
  - `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` 'collection_processing'
  - `collectionID` string, required — Unique identifier of the collection.
  - `collectionName` string, required — Name/path of the collection.
  - `operation` 'add' | 'update', required — The operation performed (add or update).
  - `processedCount` integer, required — Number of items successfully processed.
  - `collectionItemIDs` string[] — Array of collection item KSUIDs that were added or updated.
  - `status` 'success' | 'failed', required — Processing status (success or failed).
  - `errorMessage` string — Error message if processing failed.

## 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)
