Skip to main content
Webhooks let Guardhouse push notifications to your systems when events of interest occur — for example, when an incident report is submitted or approved. You register one or more subscribers (each owns a HMAC secret) and attach subscriptions (event/URI pairs) to them. This section requires an API key with KeyType=webhook.

Event catalog

Subscriptions are identified by an event and an eventType. Today the supported pairs are:
The catalog will grow. Unknown event / eventType combinations sent to POST /api/webhook/subscriptions return 400 Bad Request.

Registration flow

1. Create a subscriber

The response includes the secretToken you’ll use for signature validation. Store it securely — it is shown only on creation and on rotation.

2. Subscribe to an event

The uri must be reachable over HTTPS and respond 2xx within a few seconds.

3. Receive notifications

Guardhouse will POST a JSON payload to your uri whenever the subscribed event fires. Each request includes a Webhooks-Signature header containing an HMAC-SHA256 of the raw request body, keyed by your subscriber’s secretToken.

Validating signatures

Compute the HMAC of the raw request body using your secretToken and compare against the header value with a constant-time comparison.
If the signature does not match, respond with 403 and discard the message.

Delivery and retries

  • A delivery is considered successful when your endpoint responds 2xx within the request timeout.
  • Failed deliveries (Failed) are retried with backoff. After several failures the notification status flips to MaxRetriesReached and is no longer retried — fix the endpoint and contact support to replay missed events if needed.
  • Notifications are delivered at-least-once. Use the event’s identifying ID (incidentReportId, timesheetId) to deduplicate.

Managing subscribers and subscriptions

To rotate a subscriber’s secretToken, send { "rotateSecretToken": true } to the subscriber update endpoint. The response will contain the new token; the previous token will no longer validate signatures.