WebhookEvent
The JSON body POSTed to your endpoint when an import session reaches a terminal state.
Registration. Partners create endpoints with
POST /api/v1/public/webhooks (API-only; no UI). Store the one-time
signingSecret from the create response.
Verifying signatures (as implemented). Every delivery carries an
X-LayerIQ-Signature header of the form t=<unix_seconds>,v1=<hex>,
plus X-LayerIQ-Event (echoes type) and User-Agent: LayerIQ-Webhooks/1.0.
Recompute the HMAC and compare:
signed = `${t}.${rawRequestBody}`
expected = HMAC_SHA256(signingSecret, signed) # hex
verify = timingSafeEqual(expected, v1)
Use the raw request body bytes (do not re-serialize the JSON), and reject
deliveries whose t is outside an acceptable clock-skew window (e.g. 5
minutes) to prevent replay.
Retries (as implemented). The delivery worker POSTs with a 10s timeout.
Non-2xx and network errors throw so Inngest retries with backoff
(retries: 5 on the delivery function). After retries are exhausted the
delivery row is marked FAILED. Successful deliveries are idempotent
(a SUCCEEDED row is never re-sent). Dedupe consumer-side on envelope id.
Event families. asset.* events carry an import-session-shaped data
with importSessionId, displayCode, and statusUrl. Optional
batchLabel is included only when the create request supplied one.
import.* events carry ImportWebhookEventData.
- createdType: string Format: date-time
At requiredthe date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
- datarequired
Import-session-shaped for asset.* events (properties below); import-shaped for import.* events (see ImportWebhookEventData).
The
datablock for asset.* import-session events.- countsType: object ยท TaskCountsrequired
- displayType: string
Code requiredOrg-scoped short code for this import session, e.g. IMP-0006.
- importType: string
Session Id requiredThe import session id - poll statusUrl for full detail.
- modeType: string enumrequiredvalues
- I
N G E S T - N
O R M A L I Z E - U
P D A T E - D
E L E T E
- statusType: string enumrequiredvalues
- completed
- failed
- statusType: string
Url requiredRelative import session status URL.
- batchType: string
Label Present only when the create request supplied a non-empty
batchLabel. - errorType: string | null
- idType: stringrequired
Delivery id; use it to dedupe.
- typeType: string enumrequiredvalues
- asset
.ingest .completed - asset
.ingest .failed - asset
.normalize .completed - asset
.normalize .failed - asset
.bulk _update .completed