Authorization token, and an
optional signing secret. Ontoto sends the payload as the raw body of a POST
or PUT request.
Exports send two kinds of payload:
- File exports send the generated file as the body, with its path in
X-Ontoto-File-Path. - Events send a small JSON body built by the export function, with no file. They suit a fetch-on-notify integration. For example, an export that runs when a device transmits tells your backend that new data has arrived, and your backend then fetches the readings through the sensor data API.
standard-webhooks library, available in most languages, can
verify them for you.
Request headers
Every delivery carries these envelope headers:
Static headers configured on the endpoint, such as
Authorization, go out
unchanged on every request. File and event exports add their own headers on
top of the envelope:
Ignore headers and
webhook-signature versions you do not recognise. New
export types and signature versions add entries without removing existing ones.
The export generation history on the Exports page also logs each
delivery’s webhook-id.
Verifying the signature
The signing secret shown when you configure the endpoint uses the Standard Webhookswhsec_<base64> format. The simplest check is a standard-webhooks
library:
- Read
webhook-timestampand check it is within your replay window. The reference libraries default to 5 minutes either side of your server clock. - Base64-decode the secret after the
whsec_prefix. Those bytes are the HMAC key. - Compute the base64 HMAC-SHA256 over the UTF-8 bytes of
{webhook-id}.{webhook-timestamp}.{raw body}. Use the raw body bytes exactly as received. - Compare the result against each
v1,<signature>entry inwebhook-signaturewith a constant-time comparison. Accept the request if any entry matches.
Why the replay window matters
The signature proves who sent a request and that nobody altered it. It does not prove when. Without a time check, a captured request would pass verification every time someone resent it. The timestamp is part of the signed content, so an attacker cannot change it without breaking the signature, and an old request replayed outside your window fails. Usewebhook-id to deduplicate replays
inside the window.
Test requests
The Send test request button in the endpoint dialog sends a small payload, by default the JSON body{ "test": true }, through the same pipeline as a
real delivery. The static headers, envelope headers and signature match a real
delivery, so it tests connectivity, authentication and your signature check end
to end.
Responding
Respond with any2xx status to acknowledge a delivery. Any other status, or
no response within 30 seconds, counts as a failed delivery.