Webhook Configurations
Webhook configurations allow you to set up notifications that are sent when parsing jobs complete or encounter specific events.
How It Works
Section titled “How It Works”When configured, webhooks send HTTP requests to your specified URL when certain events occur during the parsing process, allowing your application to respond to parsing completion or failures.
Available Options
Section titled “Available Options”Webhook URL
Section titled “Webhook URL”Specify the URL where webhook notifications should be sent. Must be an HTTP or HTTPS URL.
{ "webhook_configurations": [ { "webhook_url": "https://example.com/webhook" } ]}Webhook Events
Section titled “Webhook Events”Specify which events should trigger webhook notifications.
{ "webhook_configurations": [ { "webhook_url": "https://example.com/webhook", "webhook_events": ["parse.success"] } ]}Custom Headers
Section titled “Custom Headers”Include custom headers in webhook requests for authentication or other purposes.
{ "webhook_configurations": [ { "webhook_url": "https://example.com/webhook", "webhook_events": ["parse.success"], "webhook_headers": { "Authorization": "Bearer your-token", "X-Custom-Header": "custom-value" } } ]}Complete Configuration
Section titled “Complete Configuration”A full webhook configuration with all options:
{ "webhook_configurations": [ { "webhook_url": "https://example.com/parsing-webhook", "webhook_events": ["parse.success"], "webhook_headers": { "Authorization": "Bearer your-webhook-token", "Content-Type": "application/json" } } ]}Use Cases
Section titled “Use Cases”- Job Completion Notifications: Get notified when parsing jobs finish
- Integration Workflows: Trigger downstream processing when parsing completes
- Monitoring: Track parsing job status in external systems
- Error Handling: Receive notifications about parsing failures
Complete API Request Example
Section titled “Complete API Request Example”curl -X 'POST' \ 'https://api.cloud.llamaindex.ai/api/v2/parse' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \ --data '{ "file_id": "<file_id>", "tier": "cost_effective", "version": "latest", "webhook_configurations": [ { "webhook_url": "https://example.com/webhook", "webhook_events": ["parse.success"] } ] }'from llama_cloud import LlamaCloud
client = LlamaCloud(api_key="LLAMA_CLOUD_API_KEY")
result = client.parsing.create( upload_file="example_file.pdf", tier="cost_effective", version="latest", webhook_configurations=[ { "webhook_url": "https://example.com/webhook", "webhook_events": ["parse.success"] } ])import fs from "fs";import { LlamaCloud } from "@llamaindex/llama-cloud";
const client = new LlamaCloud({ apiKey: "LLAMA_CLOUD_API_KEY",});
const result = await client.parsing.create({ upload_file: fs.createReadStream('example_file.pdf'), tier: "cost_effective", version: "latest", webhook_configurations: [ { webhook_url: "https://example.com/webhook", webhook_events: ["parse.success"] } ]});