Fenzon

Receive and process signed events securely.

Webhook requests contain the event, entity, record ID, tenant, user, timestamp and payload. The signature is generated from your webhook secret using HMAC-SHA-256.

Request headers

Each webhook is sent as an HTTP POST with a JSON body to the configured target URL. The headers provide additional information about the event and enable secure verification of the message.

Content-Typeapplication/json – the request body is transmitted as JSON.
User-AgentFenzon-Webhook/1.0 – identifies the sender of the HTTP request.
X-Fenzon-EventName of the triggered event, for example record.created, record.updated or record.deleted.
X-Fenzon-EntityThe affected entity, for example contacts, activities or documents.
X-Fenzon-DeliveryUnique identifier for the delivery. It can be used to ensure repeated delivery attempts for the same event are not processed twice.
X-Fenzon-SignatureHMAC-SHA-256 signature of the unchanged request body in the format sha256=<HMAC>.

Verify the signature

Fenzon calculates an HMAC-SHA-256 signature from the unchanged JSON body and your webhook secret. Your endpoint calculates the same signature and compares both values before processing the content.

PHP
$raw = file_get_contents("php://input");
$received = $_SERVER["HTTP_X_FENZON_SIGNATURE"] ?? "";
$expected = "sha256=" . hash_hmac("sha256", $raw, $secret);
if (!hash_equals($expected, $received)) { http_response_code(401); exit; }
Node.js
const crypto = require("crypto");
const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
if (!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature))) throw new Error("invalid signature");

Why verify the signature?

The signature is the application-level security check. It ensures the received body has not been changed since it was signed and came from a sender that knows the secret configured for this webhook.

When sending a webhook, Fenzon creates a cryptographic verification value from the exact JSON body and the secret stored for the webhook. This value is sent in the header X-Fenzon-Signature . Your system performs the same calculation using its stored secret. If both values match, the message can be processed.

If the values do not match, the request should be rejected – for example with HTTP 401. Without this check, anyone who knows your publicly accessible webhook URL could in principle attempt to reproduce a request and trigger unwanted downstream processes.

Important: the calculation must use the unchanged raw body. If JSON is parsed first and then serialised again, formatting or key order may change and the signature would no longer match even though the content is semantically identical.

HTTPSProtects the connection during transmission.
Webhook secretKnown only to Fenzon and the receiving system and forms the basis of the signature.
HMAC-SHA-256Verifies the integrity and authenticity of the received request body.

What does the webhook contain?

The request consists of the HTTP headers described above and a JSON body. The outer structure remains consistent; the contents of payload depend on the respective event and affected entity.

Example · updated record
{
  "event": "record.updated",
  "entity": "contacts",
  "id": 4711,
  "tenant_id": 10001,
  "user_id": 42,
  "occurred_at": "2026-09-08T12:00:00+00:00",
  "payload": {
    "data": {
      "id": 4711
    }
  }
}
eventThe event that occurred, for example created, updated or deleted.
entityThe data area affected.
idID of the affected record.
tenant_idTenant to which the event belongs.
user_idUser context from which the event was triggered, where available.
occurred_atTime of the event as an ISO timestamp in UTC.
payloadEvent-specific payload data. For regular create/update events, the formatted record is typically located under payload.data. For a delete event, payload.before contains the state before deletion. Specialised processes may provide additional context fields.

Process deliveries successfully

Fenzon considers a delivery successful when your endpoint responds within the configured timeout with an HTTP status in the 2xx range. In the event of errors or timeouts, further delivery attempts may follow according to the webhook configuration.

The receiving endpoint should verify the signature as early as possible, accept the event securely and then respond quickly with a 2xx status. Longer downstream processes can continue internally afterwards.

Because an event may be sent again after a failed delivery attempt, the X-Fenzon-DeliveryID should be stored. If the same delivery ID has already been processed, the repeated request can be acknowledged without performing the business action a second time.

In short

Verify the signature first, process each delivery ID only once and acknowledge a successfully received delivery as quickly as possible. This keeps webhook workflows secure and reliable even when retries occur.