For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • API Reference
  • Event Reference
On this page
  • How events are delivered
  • Common envelope
  • Document Insights events
  • document-insights.extraction.completed
  • document-insights.extraction.failed
  • document-insights.extraction.rejected
  • Workflow events
  • workflow.run.completed
  • workflow.run.failed
  • Event type summary

Event Reference

Was this page helpful?
Previous

Document Insights extraction completed

Next
Built with

The Event Reference documents webhook payloads delivered by Plextera to endpoints configured via Event Subscriptions.


How events are delivered

Plextera sends an HTTP POST to your endpointUrl with a JSON body and standard headers. Every delivery is signed with your signingSecret - see Verifying signatures.

Plextera deduplicates deliveries per subscription, resource, and event type. If a document extraction is reprocessed after a terminal state, a later terminal state can produce a new event.


Common envelope

All events share the same top-level structure:

1{
2 "eventId": "evt_01JY7M9QWBWCPMZK5QJ7RSE9P4",
3 "eventType": "document-insights.extraction.completed",
4 "occurredAt": "2026-04-07T10:22:00Z",
5 "apiVersion": "v1",
6 "data": { "...": "event-specific payload" }
7}
FieldDescription
eventIdUnique event identifier. Stable across retry attempts for the same event.
eventTypeEvent type string.
occurredAtUTC ISO 8601 timestamp when the terminal state was reached.
apiVersionAPI version used to format the payload, for example v1.
dataEvent-specific payload.

Document Insights events

Document Insights events use the same extraction structure returned by GET /document-insights/extractions/{extractionId}. Completed events include output; failed and rejected events include error.

document-insights.extraction.completed

Delivered when a Document Insights extraction reaches COMPLETED.

1{
2 "eventId": "evt_01JY7M9QWBWCPMZK5QJ7RSE9P4",
3 "eventType": "document-insights.extraction.completed",
4 "occurredAt": "2026-04-07T10:22:00Z",
5 "apiVersion": "v1",
6 "data": {
7 "extractionId": "69654f0bc073ef404baec649",
8 "status": "COMPLETED",
9 "outputAvailable": true,
10 "createdAt": "2026-04-07T10:05:04Z",
11 "updatedAt": "2026-04-07T10:22:00Z",
12 "completedAt": "2026-04-07T10:22:00Z",
13 "error": null,
14 "tags": { "customerDocumentId": "lab-42", "docType": "lab-result" },
15 "document": {
16 "fileId": "file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM",
17 "fileName": "lab-result.pdf",
18 "mimeType": "application/pdf",
19 "sizeBytes": 63877,
20 "pageCount": 1
21 },
22 "output": {
23 "fieldCount": 3,
24 "fields": [
25 {
26 "id": "field_01",
27 "name": "labName",
28 "type": "text",
29 "value": "Quest Diagnostics",
30 "metadata": {
31 "extracted": true,
32 "confidence": 1.0,
33 "page": 1,
34 "placement": { "x": 43, "y": 12, "width": 22, "height": 4 }
35 }
36 }
37 ]
38 }
39 }
40}

document-insights.extraction.failed

Delivered when a Document Insights extraction reaches FAILED.

1{
2 "eventId": "evt_01JY7MAFAILED00000000000001",
3 "eventType": "document-insights.extraction.failed",
4 "occurredAt": "2026-04-07T10:18:00Z",
5 "apiVersion": "v1",
6 "data": {
7 "extractionId": "69654f0bc073ef404baec650",
8 "status": "FAILED",
9 "outputAvailable": false,
10 "createdAt": "2026-04-07T10:05:10Z",
11 "updatedAt": "2026-04-07T10:18:00Z",
12 "completedAt": "2026-04-07T10:18:00Z",
13 "error": {
14 "code": "DOCUMENT_EXTRACTION_FAILED",
15 "message": "The document could not be processed."
16 },
17 "tags": {},
18 "document": {
19 "fileId": "file_01JY7M4ZVX5R1P3M3Q0TA1S7ZZ",
20 "fileName": "scan-corrupted.pdf",
21 "mimeType": "application/pdf",
22 "sizeBytes": 1024,
23 "pageCount": null
24 },
25 "output": null
26 }
27}

document-insights.extraction.rejected

Delivered when a Document Insights extraction reaches REJECTED. Rejection occurs before or during validation - for example a broken, empty, duplicate, or unsupported document.

1{
2 "eventId": "evt_01JY7MREJECT0000000000001",
3 "eventType": "document-insights.extraction.rejected",
4 "occurredAt": "2026-04-07T10:06:00Z",
5 "apiVersion": "v1",
6 "data": {
7 "extractionId": "69654f0bc073ef404baec651",
8 "status": "REJECTED",
9 "outputAvailable": false,
10 "createdAt": "2026-04-07T10:05:55Z",
11 "updatedAt": "2026-04-07T10:06:00Z",
12 "completedAt": "2026-04-07T10:06:00Z",
13 "error": {
14 "code": "DOCUMENT_REJECTED",
15 "message": "The document was rejected."
16 },
17 "tags": { "customerDocumentId": "lab-42" },
18 "document": {
19 "fileId": "file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM",
20 "fileName": "lab-result.pdf",
21 "mimeType": "application/pdf",
22 "sizeBytes": 63877,
23 "pageCount": 1
24 },
25 "output": null
26 }
27}

Workflow events

workflow.run.completed

Delivered when a workflow run reaches COMPLETED. The data payload includes the full run state, step-level outputs, and nested run summaries where applicable.

1{
2 "eventId": "evt_01JY7MRUNCOMP000000000001",
3 "eventType": "workflow.run.completed",
4 "occurredAt": "2026-04-07T10:25:30Z",
5 "apiVersion": "v1",
6 "data": {
7 "runId": "69d224901610662a576cd7e6",
8 "workflowId": "daily-lab-loader",
9 "status": "COMPLETED",
10 "createdAt": "2026-04-07T10:23:00Z",
11 "updatedAt": "2026-04-07T10:25:30Z",
12 "startedAt": "2026-04-07T10:23:02Z",
13 "completedAt": "2026-04-07T10:25:30Z",
14 "error": null,
15 "workflow": { "id": "daily-lab-loader", "name": "Daily Lab Loader" },
16 "progress": { "stepsCompleted": 3, "stepsTotal": 3 },
17 "durationMs": 148000,
18 "computedDurationMs": 142000,
19 "steps": [
20 {
21 "id": "step_01",
22 "name": "Extract Lab Result",
23 "type": "document_insights",
24 "status": "COMPLETED",
25 "message": null,
26 "output": { "extractionId": "69654f0bc073ef404baec649", "fieldCount": 3 },
27 "nestedRuns": { "count": 0, "data": [] }
28 }
29 ]
30 }
31}

workflow.run.failed

Delivered when a workflow run reaches FAILED. The data.error field describes the failure, and data.steps shows which step failed and its last known status message.

1{
2 "eventId": "evt_01JY7MRUNFAIL000000000001",
3 "eventType": "workflow.run.failed",
4 "occurredAt": "2026-04-07T10:26:10Z",
5 "apiVersion": "v1",
6 "data": {
7 "runId": "69d224901610662a576cd7e7",
8 "workflowId": "daily-lab-loader",
9 "status": "FAILED",
10 "createdAt": "2026-04-07T10:23:00Z",
11 "updatedAt": "2026-04-07T10:26:10Z",
12 "startedAt": "2026-04-07T10:23:02Z",
13 "completedAt": "2026-04-07T10:26:10Z",
14 "error": {
15 "code": "WORKFLOW_RUN_FAILED",
16 "message": "Workflow run failed due to an error in step \"Push to LIMS\"."
17 },
18 "workflow": { "id": "daily-lab-loader", "name": "Daily Lab Loader" },
19 "progress": { "stepsCompleted": 2, "stepsTotal": 3 },
20 "durationMs": 188000,
21 "computedDurationMs": 180000,
22 "steps": [
23 {
24 "id": "step_03",
25 "name": "Push to LIMS",
26 "type": "web_function",
27 "status": "FAILED",
28 "message": "HTTP 503 from https://lims.example.com/api/results after 3 retries.",
29 "output": null,
30 "nestedRuns": { "count": 0, "data": [] }
31 }
32 ]
33 }
34}

Event type summary

Event typeTriggered whendata.output present
document-insights.extraction.completedDocument extraction reaches COMPLETEDYes, ExtractionOutput
document-insights.extraction.failedDocument extraction reaches FAILEDNo
document-insights.extraction.rejectedDocument extraction reaches REJECTEDNo
workflow.run.completedWorkflow run reaches COMPLETEDStep outputs in steps
workflow.run.failedWorkflow run reaches FAILED or CLOSEDNo top-level output; failed or closed step details are in steps