Limai Docs
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

FieldTypeDescription
eventIdstringUnique event identifier. Use for idempotency.
eventTypestringAlways "DOCUMENT_REVIEWED"
timestampISO 8601When the review was completed (UTC)
organizationIdstringYour organization identifier
projectIdstringThe project the document belongs to
deploymentIdstringThe ID of the model that processed this document
viaDeploymentIdstring | nullThe ID of the deployment the request arrived through. null when the request named the model directly
deploymentNamestring | nullThe name of that deployment, such as "production". null whenever viaDeploymentId is null
schemaVersionIdstring | nullThe ID of the frozen schema version the run resolved to. null when the deployment tracks the draft schema
extractionSchemaIdstringThe extraction schema ID of that model
fileIdstringThe reviewed file identifier
jobIdnullAlways null for review events
data.status"success"Always "success" for this event
data.errorMessagenullAlways 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.

On this page