> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

## The Event object

| Field     | Description                                                                                                                    |
| --------- | ------------------------------------------------------------------------------------------------------------------------------ |
| eventId   | **string** - Unique identifier for the event                                                                                   |
| eventType | **string** - Type of the event that occurred (workflow\_run.completed)                                                         |
| payload   | **object** - Contains the WorkflowRun object. See the [WorkflowRun object](/api-reference/objects/workflow_run) for the shape. |

Here is what you can expect for a given incoming event:

```json Example Event theme={null}
{
  "eventId": "event_1234",
  "eventType": "workflow_run.completed",
  "payload": {
    "object": "workflow_run",
    "id": "workflow_run_1234"
    // etc.
  }
}
```

## Workflow specific event types

The following table outlines the various event types you can receive via webhooks for a given workflow after you have created a webhook endpoint and subscribed to the desired event types.

| Event Type                        | Description                                                                                                                                                                                                               |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workflow_run.completed`          | Triggered whenever a WorkflowRun is completed                                                                                                                                                                             |
| `workflow_run.failed`             | Triggered whenever a WorkflowRun fails                                                                                                                                                                                    |
| `workflow_run.needs_review`       | Triggered whenever a WorkflowRun needs review\*                                                                                                                                                                           |
| `workflow_run.rejected`           | Triggered whenever a WorkflowRun is rejected from the Extend dashboard. [More info](/product-reference/reviewing_workflow_run#rejecting-a-workflow-run)                                                                   |
| `workflow_run.step_run.processed` | Triggered whenever a WorkflowStep is finished processing, e.g. extraction steps, etc. This can be useful for consuming incremental extractions for workflows with multiple AI steps to create streaming-like experiences. |

\* Only triggered when the workflow is configured to have a HumanReview step in the Extend workflow builder.

## Processor run specific event types

The following table outlines the event types you can receive via webhook for a given processor run that you have created using the API after you have created a webhook endpoint and subscribed to the desired event types.

| Event Type                | Description                                               |
| ------------------------- | --------------------------------------------------------- |
| `processor_run.processed` | Triggered whenever a ProcessorRun has finished processing |
| `processor_run.failed`    | Triggered whenever a ProcessorRun fails                   |

## Global event types

The following table outlines the various event types you can receive via webhooks for your workspace as a whole after you have created a webhook endpoint and subscribed to the desired global event types.

| Event Type                    | Description                                                                                                                                                 |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workflow.created`            | Triggered when a new Workflow is created                                                                                                                    |
| `workflow.deployed`           | Triggered when a Workflow is deployed                                                                                                                       |
| `workflow.deleted`            | Triggered when a Workflow is deleted                                                                                                                        |
| `processor.created`           | Triggered when a new Processor is created                                                                                                                   |
| `processor.updated`           | Triggered when a Processor is updated                                                                                                                       |
| `processor.deleted`           | Triggered when a Processor is deleted                                                                                                                       |
| `processor.draft.updated`     | Triggered when a Processor's draft version is updated. Typically this is when someone hits Save on the Extend Dashboard or a config is updated via the API. |
| `processor.version.published` | Triggered when a new ProcessorVersion of a Processor is published. Typically this is when someone hits Publish on the Extend Dashboard.                     |
