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:
| Field | Type | Present on | Description |
|---|---|---|---|
event | string | all | Event type — route your handler on this field |
runId | string | all | Run id; empty string for document.received (no run exists yet) |
documentId | string | all | Document id |
environmentId | string | all | Environment id (not the environment slug) |
status | string | all | Delivery-time status literal (see per-event notes below) |
timestamp | string | all | ISO 8601 dispatch time |
data | object | run.completed | Extracted structured data |
confidence | number | run.completed | Extraction confidence, 0.0 to 1.0 |
errorMessage | string | run.failed | Failure description |
documentName | string | document.received | Document 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"
}