Skip to main content
Webhook

Create webhook

POST/v4/config/platform/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 body id, type, schemaVersion, occurredAt, organisationId, sandboxOrganisationId, subject and data, and X-IGrant-* headers with the event id, the event type, the webhook id, the delivery id and the attempt number. The X-IGrant-Signature header is t=<Unix seconds>,v1=<hex>: the lowercase hexadecimal HMAC-SHA256 of <t>.<body> with the secret key, over the exact bytes of the body. Only a 2xx answer 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, type and data, and the signature t=<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

  • Authorizationstringheaderrequired

    Your API key with the prefix ApiKey: ApiKey <your-api-key>. Get an API key.

    Scope:webhooks:create

Body

application/json

The webhook to create.

  • webhookobjectrequired

    The webhook to create.

Response

application/json

The new webhook, with its secret key in clear text.

  • webhookobject

    The new webhook, with the id, orgId and timestamp that the service set.