Skip to content
AnchrasDocumentation
Browse documentation

Integrations / User guide

Notifications

Available

Outbound webhooks

Deliver signed Anchras events to your own HTTPS receiver and verify delivery.

On this page

Before you begin

Provide an HTTPS endpoint that can accept signed JSON events and implement receiver-side signature verification. You need permission to configure the integration in your Anchras organization.

Connection settings

SettingWhat to enter
NameA recognizable connection name.
Webhook URLHTTPS endpoint that receives signed JSON events.
Event familiesLeave empty to receive all events.

Connect the destination

  1. Open Outbound Webhooks in the console and add a connection.
  2. Enter the destination settings above and save the connection.
  3. Use the supported validation or test-delivery action, then inspect the destination for evidence of receipt.
  4. Enable the intended event families or metric export and verify delivery from a real test operation.

Verify delivery

Record the signing secret shown by Anchras when creating the webhook; it is shown once. Verify signatures at the receiver, reject invalid requests and make event handling idempotent. Inspect actual received events as well as delivery status.

Verify the request signature

Anchras sends X-Anchras-Signature: sha256=<hex-digest>. Compute HMAC-SHA256 over the exact request body bytes using the raw key obtained by decoding the displayed signing secret as unpadded base64url. Compare digests in constant time before parsing or processing the JSON. Do not use the encoded secret string itself as the HMAC key.

This Node.js example accepts a raw body Buffer, the signature header and the signing secret saved at connection creation:

javascript
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyAnchrasWebhook(rawBody, signature, signingSecret) {
  if (typeof signature !== "string" || !/^sha256=[0-9a-f]{64}$/.test(signature)) {
    return false;
  }
  const key = Buffer.from(signingSecret, "base64url");
  const expected = createHmac("sha256", key).update(rawBody).digest();
  const received = Buffer.from(signature.slice("sha256=".length), "hex");
  return received.length === expected.length && timingSafeEqual(received, expected);
}

Capture the raw body before JSON middleware changes it, and reject a request when verification returns false. X-Anchras-Event identifies the event type, but the signature covers the body rather than HTTP headers. Use the verified payload for processing decisions. Signature verification does not prevent replay by itself; make event handling idempotent.

Availability and limits

An empty event-family selection receives all events. Limit the selection to what the destination should receive. Destinations can reject, throttle or fail deliveries independently of the saved configuration.

Troubleshooting

Check HTTPS reachability and the receiver response. For signature errors, compare the current signing secret and verify against the exact received payload rather than reconstructed JSON.

Operate the connection

Rotate destination secrets and test delivery after changes. Review failed deliveries or missing data before retrying at scale. Remove unused destinations when they no longer serve the organization.