Event Types

Tracore dispatches the following webhook events. Each event is delivered as a POST request to your webhook URL with a flat JSON payload.

All events share the same top-level shape — there is no nested envelope:

FieldTypePresent onDescription
eventstringallEvent type — route your handler on this field
runIdstringallRun id; empty string for document.received (no run exists yet)
documentIdstringallDocument id
environmentIdstringallEnvironment id (not the environment slug)
statusstringallDelivery-time status literal (see per-event notes below)
timestampstringallISO 8601 dispatch time
dataobjectrun.completedExtracted structured data
confidencenumberrun.completedExtraction confidence, 0.0 to 1.0
errorMessagestringrun.failedFailure description
documentNamestringdocument.receivedDocument display name

document.received

Fired when a new document is uploaded to a schema. runId is an empty string and status is received.

{
  "event": "document.received",
  "runId": "",
  "documentId": "doc_abc123",
  "environmentId": "env_prod123",
  "status": "received",
  "timestamp": "2026-03-15T10:30:00.000Z",
  "documentName": "invoice.pdf"
}

run.processing

Fired when an extraction run begins processing.

{
  "event": "run.processing",
  "runId": "run_xyz789",
  "documentId": "doc_abc123",
  "environmentId": "env_prod123",
  "status": "processing",
  "timestamp": "2026-03-15T10:30:05.000Z"
}

run.completed

Fired when an extraction run finishes successfully. data contains the extracted structured data.

{
  "event": "run.completed",
  "runId": "run_xyz789",
  "documentId": "doc_abc123",
  "environmentId": "env_prod123",
  "status": "completed",
  "timestamp": "2026-03-15T10:30:12.000Z",
  "data": {
    "invoiceNumber": "INV-2026-001",
    "date": "2026-03-15",
    "totalAmount": 1250.00,
    "vendor": "Acme Corp"
  },
  "confidence": 0.92
}

run.failed

Fired when an extraction run fails or produces results that do not pass schema validation.

Note: status is always the literal failed in this payload, even when the run’s terminal status in the API is validation_failed. Route on event and treat status as uninformative; fetch the run via the API if you need to distinguish the two failure modes.

{
  "event": "run.failed",
  "runId": "run_xyz789",
  "documentId": "doc_abc123",
  "environmentId": "env_prod123",
  "status": "failed",
  "timestamp": "2026-03-15T10:30:12.000Z",
  "errorMessage": "Document could not be parsed: unsupported format"
}