Document Extracted

Webhook Event

The Document Extracted event is triggered when document processing completes, whether successful or failed. This event provides immediate feedback on extraction job status.

When It Triggers

Event Trigger Conditions
This event fires immediately after document processing completes

Successful Extraction

When a document is successfully processed and data is extracted

Failed Extraction

When document processing fails due to errors or timeouts

Payload Structure

Complete Event Payload
The structure sent to your webhook endpoint for Document Extracted events
document-extracted-payload.json
{
  "eventId": "evt_abc123def456",
  "eventType": "DOCUMENT_EXTRACTED",
  "timestamp": "2024-01-15T10:30:00Z",
  "organizationId": "org_xyz789",
  "deploymentId": "dep_123abc",
  "extractionSchemaId": "schema_456def",
  "fileId": "file_789ghi",
  "jobId": "job_012jkl",
  "data": {
    "status": "success",
    "errorMessage": null
  }
}
Field Descriptions
Detailed explanation of each field in the payload
eventId
string

Unique identifier for this webhook event. Use for idempotency to prevent duplicate processing.

eventType
string

Always "DOCUMENT_EXTRACTED" for this event type.

timestamp
ISO 8601

When the extraction completed, in ISO 8601 format (UTC).

organizationId
string

Your organization identifier.

deploymentId
string

The deployment that processed this document.

extractionSchemaId
string

The extraction schema used to process the document.

fileId
string

Unique identifier for the processed file.

jobId
string

Extraction job identifier. Unique for each processing attempt.

data.status
"success" | "failed"

Extraction result: "success" if completed successfully, "failed" if errors occurred.

data.errorMessage
string | null

Error description if status is "failed", otherwise null.

Success vs Failed Examples

Successful Extraction
Payload when document processing succeeds
success-payload.json
{
  "eventId": "evt_success_456",
  "eventType": "DOCUMENT_EXTRACTED",
  "timestamp": "2024-01-15T10:30:45Z",
  "organizationId": "org_xyz789",
  "deploymentId": "dep_123abc",
  "extractionSchemaId": "schema_456def",
  "fileId": "file_789ghi",
  "jobId": "job_012jkl",
  "data": {
    "status": "success",
    "errorMessage": null
  }
}
Failed Extraction
Payload when document processing fails
failed-payload.json
{
  "eventId": "evt_failed_789",
  "eventType": "DOCUMENT_EXTRACTED",
  "timestamp": "2024-01-15T10:32:15Z",
  "organizationId": "org_xyz789",
  "deploymentId": "dep_123abc",
  "extractionSchemaId": "schema_456def",
  "fileId": "file_bad123",
  "jobId": "job_error456",
  "data": {
    "status": "failed",
    "errorMessage": "Document format not supported"
  }
}

Implementation Examples

Handling Document Extracted Events
Example webhook handlers for processing Document Extracted events
document-extracted-handler.js