Skip to main content
Webhook subscriptions let you receive HTTP POST notifications when jobs change state, eliminating the need to poll the jobs API. This guide walks through creating, receiving, and managing webhook subscriptions.
For background on how webhooks work and when to use them, see Webhooks. For complete API details, see the Webhooks API Reference.

Prerequisites

What you’ll learn

  • How to create a job webhook subscription with filters
  • How to receive and verify webhook events
  • How to list, inspect, and archive subscriptions

Creating a job webhook subscription

Use the POST /webhooks endpoint to create a subscription. Set the type to webhook_subscription_jobs and provide your endpoint URL.

Receiving events

When a job matches your subscription’s filters, Narrative sends an HTTP POST to your URL with a JSON payload.

Example event payload

Your endpoint should return a 2xx status code to acknowledge receipt.

Handling idempotency

Each event includes an idempotencyKey — a unique identifier for that specific delivery. If Narrative delivers the same event more than once (for example, due to a network retry), the idempotency key remains the same. Use the idempotency key to detect duplicates:
  1. When you receive an event, check if you’ve already processed that idempotencyKey
  2. If yes, return 200 OK without processing again
  3. If no, process the event and store the key

Managing subscriptions

List all subscriptions

Returns an array of all webhook subscriptions for your company, including both active and archived subscriptions.

Get a specific subscription

Archive a subscription

Archiving stops event delivery but retains the subscription record.
Archiving is permanent — there is no way to reactivate an archived subscription. Create a new subscription if you need to resume notifications.

Best practices


Webhooks

How webhooks work and when to use them

Webhook Event Reference

Complete field reference for subscription requests and responses

Tracking Job Status

Poll-based alternative for monitoring job progress

API Keys

Create and manage API tokens for webhook access