Skip to main content
Outbound webhooks notify external services when events happen in your workflow app.

Setup

  1. Open your workflow app and go to Webhooks in the sidebar.
  2. On the Outgoing tab, click Add endpoint.
  3. Enter the destination URL, select the events to subscribe to, and save.
  4. Copy the signing secret — you’ll use it to verify incoming requests.

Events

Delivery

Requests are delivered asynchronously. HASP retries failed deliveries up to 5 times with exponential backoff: A delivery is considered successful if the endpoint returns any 2xx status code within 10 seconds. Redirects are not followed.

Request Format

Body envelope:

Verifying Signatures

Every delivery includes a Hasp-Signature header using the same scheme Stripe uses: t={unix_timestamp},v1={hmac-hex}. The signed value is "{timestamp}.{raw_body}", HMAC-SHA256’d with your endpoint’s secret — binding the signature to a point in time so a captured request can’t be replayed later. While a secret rotation is within its 7-day grace period (see Rotating the Signing Secret), the header carries two v1 entries — one signed with the new secret, one with the old:
Verification is: parse t and every v1 value, recompute the expected signature with whichever secret(s) you have deployed, and accept the delivery if any v1 value matches.
Compute the signature against the raw request body bytes, not a parsed JSON object. Use a constant-time comparison to prevent timing attacks, and reject timestamps outside a ±5-minute tolerance to prevent replay.

Idempotency

The X-Hasp-Webhook-Id header contains the delivery ULID. Store this value and check for duplicates before processing — network failures can cause the same delivery to arrive more than once.

Rotating the Signing Secret

Call POST /v1/webhooks/{endpoint_id}/rotate-secret (see Rotate the signing secret). The previous secret remains valid for signing for 7 days after rotation — every delivery during that window carries both signatures (see Verifying Signatures above), so you can deploy the new secret without missing or rejecting a delivery.