API ReferenceWebhooks
Document Reviewed Event
Webhook event fired when all rows in a document are accepted after human review.
The DOCUMENT_REVIEWED event fires when all rows in a document are marked as accepted, confirming that the document processing workflow is complete and the data is ready for use.
When It Triggers
- All rows accepted -- When every extracted data row for a document is marked as accepted (no pending rows remain)
- Human review complete -- Confirms that reviewers have validated and approved the extracted data
This event fires after using the submit-corrections API endpoint or accepting rows through the UI.
Payload Structure
Response200
{
"eventId": "evt_reviewed_456",
"eventType": "DOCUMENT_REVIEWED",
"timestamp": "2024-01-15T10:45:30Z",
"organizationId": "org_xyz789",
"projectId": "proj_abc123",
"deploymentId": "dep_123abc",
"viaDeploymentId": "dpl_prod01",
"deploymentName": "production",
"schemaVersionId": "sv_7",
"extractionSchemaId": "schema_456def",
"fileId": "file_789ghi",
"jobId": null,
"data": {
"status": "success",
"errorMessage": null
}
}Payload Fields
| Field | Type | Description |
|---|---|---|
eventId | string | Unique event identifier. Use for idempotency. |
eventType | string | Always "DOCUMENT_REVIEWED" |
timestamp | ISO 8601 | When the review was completed (UTC) |
organizationId | string | Your organization identifier |
projectId | string | The project the document belongs to |
deploymentId | string | The ID of the model that processed this document |
viaDeploymentId | string | null | The ID of the deployment the request arrived through. null when the request named the model directly |
deploymentName | string | null | The name of that deployment, such as "production". null whenever viaDeploymentId is null |
schemaVersionId | string | null | The ID of the frozen schema version the run resolved to. null when the deployment tracks the draft schema |
extractionSchemaId | string | The extraction schema ID of that model |
fileId | string | The reviewed file identifier |
jobId | null | Always null for review events |
data.status | "success" | Always "success" for this event |
data.errorMessage | null | Always null for this event |
The payload does not carry row counts. Read the document with the fileId when you need them.
Handling the Event
function handleDocumentReviewed(event) {
const { eventId, fileId, extractionSchemaId, data } = event
console.log(`Document ${fileId} review completed (${data.status})`)
fetchFileData(fileId).then(fileData => {
exportToDownstreamSystems(fileData)
notifyStakeholders(fileId, "COMPLETED")
})
}Retrieving Reviewed Data
The webhook payload contains metadata only. To get the final reviewed data, call the get-file-data endpoint using the fileId from the payload.