Skip to main content

Webhooks

Send each new, changed, deleted or acknowledged event of a type to your own HTTPS endpoint.

Add a webhook​

  1. Open the event type's Connections tab and, under Webhooks, select Add webhook.
  2. Enter the URL. It must start with https://.
  3. Optionally enter a Secret of 16 to 512 characters, or generate one and copy it. With a secret, each delivery is signed.
  4. 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:

HeaderValue
X-Logbook-Delivery-IdThe delivery id. Deduplicate on it
X-Logbook-SignatureOnly with a secret: sha256= followed by the lowercase hex HMAC-SHA256 of the raw body, keyed with the secret
Body fieldContent
webhookDeliveryIdSame as the header
actionCREATED, UPDATED, DELETED or ACKNOWLEDGED
issuedAtWhen the delivery was assembled (UTC)
companyIdYour company id
eventThe event: id, eventTypeId, author, severity, description, timestamp or startAt/endAt, customFieldValues (a JSON string keyed by field id), createdAt, and deletedAt for deletions
acknowledgementFor 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.