Webhooks
Send each new, changed, deleted or acknowledged event of a type to your own HTTPS endpoint.
Add a webhook
- Open the event type's Connections tab and, under Webhooks, select Add webhook.
- Enter the URL. It must start with
https://. - Optionally enter a Secret of 16 to 512 characters, or generate one and copy it. With a secret, each delivery is signed.
- Select the actions: Created, Updated, Deleted, Acknowledged.
Editing a webhook also lets you switch it Active off, replace the secret, or Remove signing secret (deliver unsigned).
URLs that point to private or internal addresses are refused.
Deliveries
Each delivery is a POST with a JSON body and these headers:
| Header | Value |
|---|---|
X-Logbook-Delivery-Id | The delivery id. Deduplicate on it |
X-Logbook-Signature | Only with a secret: sha256= followed by the lowercase hex HMAC-SHA256 of the raw body, keyed with the secret |
| Body field | Content |
|---|---|
webhookDeliveryId | Same as the header |
action | CREATED, UPDATED, DELETED or ACKNOWLEDGED |
issuedAt | When the delivery was assembled (UTC) |
companyId | Your company id |
event | The event: id, eventTypeId, author, severity, description, timestamp or startAt/endAt, customFieldValues (a JSON string keyed by field id), createdAt, and deletedAt for deletions |
acknowledgement | For ACKNOWLEDGED only: id, actor, acknowledgedAt |
A delivery succeeds on any 2xx answer. Otherwise Logbook tries again after 1, 2, 4 and 8 minutes: five attempts in total.