Tenant webhooks
Updated
A tenant administrator registers an HTTPS URL. After a document posts or a command succeeds, the host POSTs a small signed JSON envelope to that URL. Posting does not wait on HTTP. A rolled-back post sends nothing.
This is not an outbound channel. Channels are model metadata (ZATCA, ЄРПН)
a script names. A webhook URL is runtime config. Do not put a partner URL on
MetaOutboundChannel. Scripts have no webhook API.
Envelope#
{
"id": "<PublishId>",
"event": "document.posted",
"objectName": "SalesOrder",
"recordId": "<guid>",
"commandName": null,
"userId": "<guid or null>",
"utc": "2026-11-26T13:00:00Z"
}
No document body, no table parts. Load the record through OData or the existing
APIs. Events: document.posted, command.succeeded. A Test button sends
webhook.test with no business record.
Headers:
| Header | |
|---|---|
Content-Type |
application/json |
X-ZuloOne-Event |
event name |
X-ZuloOne-Signature |
sha256=<hex> — HMAC-SHA256 of the raw body |
X-ZuloOne-Delivery |
delivery id |
Verify the signature#
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(secret));
var hex = Convert.ToHexString(hmac.ComputeHash(Encoding.UTF8.GetBytes(body))).ToLowerInvariant();
var ok = CryptographicOperations.FixedTimeEquals(
Encoding.UTF8.GetBytes("sha256=" + hex),
Encoding.UTF8.GetBytes(header));
The secret is a credential name (CredentialRef) or a one-shot value stored
encrypted. GET never returns it.
Retry#
Pending → InFlight → Succeeded / Abandoned. Max 8 attempts, exponential backoff,
15 s timeout. HTTP 2xx succeeds. 4xx except 429 is Abandoned. 429 / 5xx / network
retry. Duplicate (subscription, publish id) is a no-op.
SSRF#
HTTPS only. Loopback, RFC1918, link-local, and cloud metadata are refused
(OutboundUrlGuard, Host reach). The same ConnectCallback re-checks the address
at dial time.
Admin#
SPA /webhooks (Administrators). List, create, disable, delete, Test, last 50
deliveries. API: GET/POST /api/webhooks, PUT/DELETE /api/webhooks/{id},
POST /api/webhooks/{id}/test, GET /api/webhooks/{id}/deliveries.
In-process events still go through IDomainEventSink. The webhook handler only
enqueues. HTTP is WebhookSenderService, not OutboundSenderService.
See also: Office inbox, Assistant on event, Partner integration, Enqueue an outbound call.