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.done"] } ]}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.done"], "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.done"], "webhook_headers": { "Authorization": "Bearer your-webhook-token", "Content-Type": "application/json" } } ]}Note: Currently only the first webhook configuration in the array is used.
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.done"] } ] }'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.done"] } ])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.done"] } ]});