Today we shipped one of our most requested features: webhooks. With ERMLib v2.6, you can subscribe to real-time events and have ERMLib push notifications to any HTTP endpoint whenever something happens in your system.
Why Webhooks Matter
Before webhooks, integrating ERMLib with external tools meant polling our API at intervals. Your analytics platform would check for new circulation data every 15 minutes. Your messaging system would query for overdue items hourly. Polling works, but it is wasteful, introduces latency, and creates unnecessary load.
Webhooks flip the model. Instead of you asking ERMLib "did anything change?", ERMLib tells you the moment something happens.
Available Events
At launch, we support webhooks for the following event categories:
Circulation Events
checkout.completed: Fires when an item is checked out to a patron.checkin.completed: Fires when an item is returned.hold.placed: Fires when a patron places a new hold.hold.fulfilled: Fires when a held item is ready for pickup.item.overdue: Fires when an item passes its due date.
Catalog Events
record.created: Fires when a new bibliographic record is added.record.updated: Fires when a record is modified.item.added: Fires when a new item is attached to a record.
Patron Events
patron.registered: Fires when a new patron account is created.patron.card_expired: Fires when a patron's library card reaches its expiration date.
Each webhook payload includes the full event details in JSON format, a timestamp, and a unique event ID for deduplication.
Setting Up Webhooks
Configuration takes about five minutes:
- Go to Settings > Integrations > Webhooks.
- Click Create Webhook.
- Enter the target URL for your endpoint.
- Select the events you want to subscribe to.
- Optionally add a shared secret for HMAC signature verification.
ERMLib signs every webhook payload with your shared secret so you can verify that requests genuinely came from your ERMLib instance. We include retry logic with exponential backoff. If your endpoint is temporarily down, we will retry up to five times over 24 hours.
Use Cases We Are Excited About
- Slack notifications: Post a message to a staff channel whenever a high-demand item is returned, so holds can be processed immediately.
- Analytics pipelines: Stream circulation events to a data warehouse for real-time dashboards.
- Patron messaging: Trigger SMS or email notifications through your preferred messaging provider when holds are ready.
- Inventory sync: Keep an external asset management system in sync with ERMLib's item records.
Webhook Logs
Every webhook delivery is logged in the ERMLib dashboard with the HTTP status code, response time, and payload. Failed deliveries are flagged with the error details so you can debug quickly. You can also replay any webhook event manually for testing.
What Is Next
We are working on additional event types for interlibrary loan, acquisitions, and fine payments. If there is a specific event you need, let us know; webhook coverage will expand based on what our users are building.