Skip to main content
Webhooks deliver Adclear events to your endpoint as soon as they happen, so you do not have to poll. You provide an HTTPS URL during onboarding. If signing is enabled for your organisation, you also receive a shared secret to verify that requests came from Adclear.

Overview and configuration

Two generations of webhooks run side by side. The one described in this section, provisioned during onboarding, keeps working exactly as it does today. Endpoints you add yourself in Settings use the catalogue, envelope and signature scheme in Endpoints you manage yourself.
Webhooks are configured per organisation by the Adclear team during onboarding. Delivery:
  • Sent as application/json via POST.
  • Treat delivery as best-effort, and expect occasional repeats. Acknowledge quickly with 2xx, then process asynchronously. For evaluation-completed, see Missed or failed deliveries.
  • Deduplicate lifecycle events on deliveryId. Deduplicate evaluation-completed on evaluationId.

Endpoints you manage yourself

You can add, edit and delete your own endpoints under Settings, Developers, Webhooks. Each one gets its own signing secret, a delivery log with the request and response of every attempt, a resend action and a test event. See Set up webhooks for the screens themselves. These endpoints are a second generation, not a replacement. The event names are dotted catalogue keys, the envelope is different, the header names are different, and the signature scheme is different. Everything above stays as it is.

Event catalogue

A key is never renamed and never reused for a different meaning. A changed meaning is a new key. Subscribing to * rather than a list means every event, including ones added later. It is a subscription value only and never appears as an event type.

Envelope

Delivery is at-least-once and events are not guaranteed to arrive in the order they happened. A retry can land after a later event, and two events about the same promotion can arrive either way round. Order events by occurredAt, and use id and deliveryId to drop any you have already processed. Adclear rejects an event with an unrecognised top-level field rather than dropping it, so the envelope cannot widen by accident. A serialised event is at most 256 KB.

Headers

Any custom headers you configure on the endpoint are sent as well. A custom header cannot use the name of any header in the table above. Names are compared without regard to case, so adclear-signature is refused too, and the endpoint is not saved until the header is renamed or removed.

Verify the signature

v1 is an HMAC-SHA256 hex digest of <t>.<raw body>, keyed with the endpoint’s signing secret. Because the timestamp is part of the signed string it cannot be altered on its own, so checking t against your own clock gives you replay protection. Reject a delivery whose timestamp is more than five minutes from your clock. Sign the raw bytes you received, not a re-serialised object.
Unknown keys in the header are ignored, so a future v2= can be added without breaking a receiver that only reads v1.

Delivery and retries

Adclear switches an endpoint off after 20 failed deliveries in a row, and its settings page says so. Fix the receiver, then turn the endpoint back on from that page, which also clears the run of failures. A test event goes through the same delivery path as a real one. It cannot be sent to an endpoint that is switched off: turn the endpoint back on first. Request and response bodies in the delivery log are kept for 7 days and then cleared. The log rows stay. Resending a delivery replays the stored body, so it is possible only inside that window.

Common lifecycle envelope

The five review lifecycle events share this envelope. evaluation-completed keeps its existing flat payload (documented below).

Lifecycle data fields

Signature verification

If Adclear has set a signing secret for your organisation, each request includes an X-Webhook-Signature header: an HMAC-SHA256 hex digest of the raw request body, prefixed with sha256=. Verify it before processing the payload. Use the raw bytes, not a re-serialised object. Headers on webhook requests:

Evaluation payload reference

evaluation-completed uses the legacy payload shape below (not the lifecycle envelope). It may include routing metadata such as organizationId and workspaceId. Example:

Issue fields

Reply to an issue

Comment-backed issues normally include a commentId: the ID of the root comment that anchors the issue’s thread. Send it as parentCommentId when importing a reply with POST /v1/promotions/{promotionId}/versions/{versionId}/comments. Your reply threads onto the issue instead of creating a new thread. Two caveats:
  • Treat commentId as optional. A replayed delivery may omit it. When it is absent, resolve the thread with Get comments instead.
  • Comment indexing is asynchronous. If a reply sent immediately after the webhook is rejected with PARENT_NOT_FOUND, wait briefly and retry.

Missed or failed deliveries

Evaluation results

An evaluation-completed webhook can arrive late, arrive with a failed result, or not arrive at all. Each situation below says what you see and what to do. Only treat a result as a pass when status is succeeded and reviewRequired is false. An empty issues array is not enough on its own, because a succeeded result can require review with no issues listed.

Recovery endpoints

If you miss a webhook, get the current state from the Public API. These endpoints return the latest state, not a replay of missed events.

Reporting a failure to Adclear

Send these details so that Adclear can trace the webhook:
  • evaluationId, plus the correlationId from the evaluate response
  • promotionId and promotionVersionId
  • The X-Correlation-ID header, if you received the request
  • When you expected the webhook (in UTC), and what your endpoint returned

Endpoint requirements

For cross-cutting errors (401, 403, 429, 502), see Errors & rate limits.