Skip to main content
Instead of periodic polling, subscribe to events and update your copy as soon as an employee is created or terminated at Keruen LLP. An event only tells you what changed — you fetch the current data with your key.
Subscriptions are managed by the webhooks:manage scope, and re-reading records requires employees:read.
1

Subscribe to events

Create an endpoint for employee hires and deletions. The secret in the response is shown once — store it in a secrets manager; it verifies the signature of every delivery.
employee.changed combines creation and change: there is deliberately no separate created. Handle the event as an upsert — the source cannot always reliably tell an employee’s first appearance from a later change.
2

Verify the signature

Every delivery carries the Doodocs-Signature: t=<unix>,v1=<hex> header, where v1 is HMAC-SHA256(secret, "{t}.{request body}") in hex. Reject the request if the signature does not match or t is older than five minutes (replay protection).
3

Re-read and upsert

The payload contains only employee_id. Fetch the record with your key — that way the key’s scope and field redaction apply to the data, and personal data does not leave for an external URL.
  • employee.changed → re-read GET /employees/{employee_id} and upsert by id.
  • employee.deleted → a re-read returns 404 EMPLOYEE_NOT_FOUND. Do not treat this as an error: the event is self-contained, so mark the employee deleted.

The handler

Deduplicate on the event id (delivery is at-least-once), respond 2xx quickly, and push the heavy work to the background.
An employee may be deleted between employee.changed and your re-read — then GET /employees/{id} returns 404. Treat this as a deletion, not a failure.

Next

Sync all employees

Initial export and a full re-read to reconcile deletions.

Webhooks

All event types, delivery reliability, and debugging.