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.

  • createdAt
    Type: string Format: date-time
    required

    the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

  • data
    required

    Import-session-shaped for asset.* events (properties below); import-shaped for import.* events (see ImportWebhookEventData).

    The data block for asset.* import-session events.

    • counts
      Type: object ยท TaskCounts
      required
    • displayCode
      Type: string
      required

      Org-scoped short code for this import session, e.g. IMP-0006.

    • importSessionId
      Type: string
      required

      The import session id - poll statusUrl for full detail.

    • mode
      Type: string enum
      required
      values
      • INGEST
      • NORMALIZE
      • UPDATE
      • DELETE
    • status
      Type: string enum
      required
      values
      • completed
      • failed
    • statusUrl
      Type: string
      required

      Relative import session status URL.

    • batchLabel
      Type: string

      Present only when the create request supplied a non-empty batchLabel.

    • error
      Type: string | null
  • id
    Type: string
    required

    Delivery id; use it to dedupe.

  • type
    Type: string enum
    required
    values
    • asset.ingest.completed
    • asset.ingest.failed
    • asset.normalize.completed
    • asset.normalize.failed
    • asset.bulk_update.completed