For background on how webhooks work and when to use them, see Webhooks. For complete API details, see the Webhooks API Reference.
Prerequisites
- An API token with Webhooks
readandwritepermissions - An HTTPS endpoint ready to receive POST requests
- Familiarity with job types and job states
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 thePOST /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
2xx status code to acknowledge receipt.
Handling idempotency
Each event includes anidempotencyKey — 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:
- When you receive an event, check if you’ve already processed that
idempotencyKey - If yes, return
200 OKwithout processing again - If no, process the event and store the key
Managing subscriptions
List all subscriptions
active and archived subscriptions.
Get a specific subscription
Archive a subscription
Archiving stops event delivery but retains the subscription record.Best practices
Related content
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

