Skip to main content
This reference documents the wire format for webhook subscriptions and the events Narrative delivers. For a conceptual overview, see Webhooks. For step-by-step usage, see Subscribing to Notifications. All field names in requests, responses, and delivery payloads use snake_case.

Subscription response fields

GET /webhooks and GET /webhooks/{id} return this shape. POST /webhooks returns the same shape with secret populated.
The three job filters are objects, not bare arrays, on responses. Requests take the bare array form (see below) and the server wraps them for retrieval.
Example response (job subscription with all three filters set):
Example response (app subscription):

Create request fields

POST /webhooks accepts one of two request shapes, chosen by type.

Job subscription

Filters combine with AND: an event is delivered only if it satisfies every filter you set. Omitting all three receives every job event for your company. Example request:

App subscription

Job events are never delivered to an app subscription. Example request:

Delivery payload

This is the request Narrative POSTs to your url. Verify the X-Narrative-Secret header against the subscription’s secret before processing the body. Every delivery has the same four-field envelope; type tells you what data contains.

type values

Job events use job.<state>:
  • job.pending
  • job.scheduled
  • job.running
  • job.completed
  • job.pending_cancellation
  • job.cancelled
  • job.failed
App events use <app_name>.<event_type>. The app name is lowercased with a leading “the” dropped, punctuation removed, and spaces replaced with underscores. An app named “My Test App” reporting s3_delivery.completed produces my_test_app.s3_delivery.completed.

Job event data fields

For type starting with job., data is a snapshot of the job at the moment it entered the state, plus a few resolved names. request_source fields: Example job event:
Example app event:
App payloads are app-defined beyond the fields Narrative adds. Consult the app’s documentation for the full shape.

Verifying deliveries

Every delivery carries an X-Narrative-Secret header. Compare it against the secret you stored when you created the subscription and reject anything that does not match. Return any 2xx to acknowledge the event. Anything else — including a connection failure — is treated as a failed attempt and retried with exponential backoff until the event’s attempt budget runs out. Make your handler idempotent on the envelope’s id.

Job types

The job_types filter is an open string, not a closed enum. New job types are added as the platform grows, so no fixed list is authoritative. Common values include:
  • datasets_deliver_data
  • datasets_sample
  • datasets_calculate_column_stats
  • datasets_delete_table
  • materialize-view
  • model_training_run
  • model_inference_run
  • nql-forecast
Each value is a string up to 255 characters. For descriptions, see Job Types.

Job states

The states filter accepts these values. For state transitions, see Tracking Job Status.

Subscription status values


API endpoints


Webhooks

How webhooks work and when to use them

Subscribing to Notifications

Step-by-step guide to creating and managing subscriptions

Job Types

Detailed descriptions of common job types

Webhooks API

Full REST API documentation for webhook endpoints