Create webhook
Creates a webhook: a payload URL that receives the events that it subscribes to, so that your system learns about each change without polling. Get the event types from Read webhook event types, and subscribe to at least 1.
A webhook belongs to the organisation, or to the sandbox organisation in which you create it: a webhook of a sandbox organisation receives the ows.* events of that sandbox organisation only. No other webhook of the same organisation (or sandbox organisation) can have the same payload URL.
The service sends each event as an HTTP POST with a JSON body:
- An event of the organisation wallet (an
ows.*type) has the bodyid,type,schemaVersion,occurredAt,organisationId,sandboxOrganisationId,subjectanddata, andX-IGrant-*headers with the event id, the event type, the webhook id, the delivery id and the attempt number. TheX-IGrant-Signatureheader ist=<Unix seconds>,v1=<hex>: the lowercase hexadecimal HMAC-SHA256 of<t>.<body>with the secret key, over the exact bytes of the body. Only a2xxanswer within 10 seconds is a success (a redirect is not followed). After a failure the service tries again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 24 hours, with the same body. The events of one resource arrive in order. - A consent management or data marketplace event has the body
deliveryID,webhookID,timestamp,typeanddata, and the signaturet=<UTC date-time>,sig=<hex>over<timestamp>.<body>. The service makes 1 attempt.
See Webhook Events. The answer is 200, not 201, and holds the secret key in clear text.
Authorizations
AuthorizationstringheaderrequiredYour API key with the prefix
ApiKey:ApiKey <your-api-key>. Get an API key.Scope:
webhooks:create
Body
The webhook to create.
webhookobjectrequiredThe webhook to create.
Response
The new webhook, with its secret key in clear text.
webhookobjectThe new webhook, with the
id,orgIdandtimestampthat the service set.