Contents

unforged/folio · docs · Reference

Webhooks

If your own systems need to act when something happens in folio, a webhook will tell them, so they won’t have to keep asking.

The events

  • folio.record.filed will arrive when a record has been filed.
  • folio.hold.applied and folio.hold.released will arrive when a hold is placed or released.
  • folio.record.disposed will arrive when a record has been disposed of.
  • folio.integrity.alert will arrive if a stored file no longer matches its receipt.
  • folio.export.ready will arrive when an export you asked for is ready to download.
  • folio.restore.ready will arrive when a record you asked for from slower storage is ready to open.

Setting one up

Add an endpoint in the web app, or with POST /folio/webhooks, and choose the events you want. The signing secret will be shown once, so store it somewhere safe straight away.

Each endpoint will have a delivery log and a way to send a test, and a failed delivery will be tried again. folio’s endpoints will be separate from Nib’s, so each will only get its own product’s events.

Checking a message came from us

Every message will be signed in the Unforged-Signature header exactly as Nib’s webhooks are, so if you already check Nib’s, the same code will work for folio’s. You’ll want to check the signature and its timestamp before trusting what a message says.

The routes

  • GET /folio/webhooks
  • POST /folio/webhooks
  • DELETE /folio/webhooks/{webhook_id}