> This page is for version v2024-12-23.
> For other versions, use one of these documentation indexes:
> - v2026-02-09 (default): https://docs.extend.ai/2026-02-09/llms.txt
> - v2025-04-21: https://docs.extend.ai/2025-04-21/llms.txt
> - v2024-12-23: https://docs.extend.ai/2024-12-23/llms.txt

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.ai/llms.txt
> Use this file to discover all available pages before exploring further.
>
> ## API version
> The current API version is `2026-02-09`, served at the site root (no version prefix in URLs).
> If this page URL contains `/2025-04-21/` or `/2024-12-23/`, you are reading an older API version.
> Prefer the current docs at https://docs.extend.ai/llms.txt unless the user explicitly needs that older version.
> Do not treat older-version pages as the source of truth for new integrations.

# Run Workflow

### Body

**`workflowId`** `string` — required

The ID of the workflow that files will be run through. This ID can be fetched
from viewing the workflow on the Extend platform.

---

**`files`** `File[]`

An array of Files. Either files or rawTexts must be provided. Supported file
types can be found [here](/2024-12-23/developers/guides/supported-file-types).

**`File`** `File`

#### properties

**`fileUrl`** `string` — required

A presigned URL for the file. Though we will download immediately, we
recommend a 5 - 15 minute expiration time.

---

**`fileId`** `string`

If you already have an Extend file id (for instance from running a parser or a previous file creation) then you can
run a processor via file id, and any parsed data will be reused.

---

**`fileName`** `string`

The name of the file. Optional, but recommended to improve legibility in run history in the Extend dashboard

---

**`outputs`** `Output[]`

Predetermined outputs that can be used to override the outputs
generated. Generally not recommended for most use cases, however, can be
useful in cases of overriding a classification in workflow or a subset
of extraction fields when data is known.

---

**`Output`** `Output`

#### properties

**`processorId`** `string` — required

The id of the processor that the output is associated with.

---

**`output`** `object` — required

The output that is being overridden. Output types can be found
[here](/2024-12-23/developers/guides/output-types).

---

---

---

---

**`rawTexts`** `string[]`

An array of raw strings. Can be used in place of files when passing raw data.
The raw data will be converted to .txt files and run through the workflow. If
the data follows a specific format, it is recommended to use the files
parameter instead. Either files or rawTexts must be provided.

---

**`version`** `string`

An optional version of the workflow that files will be run through. This
number can be found when viewing the workflow on the Extend platform. When a
version number is not supplied, the most recent version of the workflow will
be used. To run the "draft" version of a workflow, use "draft" as the version.

---

**`priority`** `number`

An optional value used to determine the relative order of WorkflowRuns when
rate limiting is in effect. Priority values must be an integer between 1 and
100 inclusive. Lower values will be prioritized before higher values. The
default priority value is 50.

---

**`metadata`** `any`

An optional object that can be passed in to identify the WorkflowRun. It will
be returned in the response and webhooks.

To categorize runs for billing and usage tracking, include usage tags with the `extend:usage_tags` key.

---

### Response

**`success`** `boolean`

A true or false value for whether the workflow run was created successfully or
not.

---

**`workflowRuns`** `WorkflowRun[]`

An array of WorkflowRun objects, with each WorkflowRun corresponding to a
single File that was passed in.

**`WorkflowRun`** `object`

#### properties

**`object`** `string`

The type of response, in this case it will always be "workflow\_run".

---

**`id`** `string`

An ID corresponding to a specific File x Workflow combination representing the specific WorkflowRun for a File.

---

**`status`** `string`

The status of a WorkflowRun. This will either be "PENDING" as the WorkflowRun has just started, or "PROCESSING" if the WorkflowRun is immediately started.

---

**`metadata`** `any`

The metadata that was passed in when running the Workflow.

---

**`initialRunAt`** `string`

The time (in UTC) at which the workflow was started.

---

**`outputs`** `array`

An array of outputs that were generated by the WorkflowRun. This will be empty as the WorkflowRun has just started.

The shape of the outputs will match the shape of a [processor run's output](/2024-12-23/developers/objects/processor-run).

And the `output` field will conform to the shape of [output types](/2024-12-23/developers/guides/output-types).

---

**`workflow`** `object`

The details about the Workflow that was used in this WorkflowRun.

#### properties

**`id`** `string`

The Workflow ID that can be fetched from the Extend Platform.

---

**`name`** `string`

The name of the Workflow.

---

**`version`** `string`

The version of the Workflow.

---

---

---

---

**`Example Request`**

```bash Example Request
curl --location --request POST 'https://api-prod.extend.app/workflow_runs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_TOKEN>' \
--data '{
    "workflowId": "workflow_1234",
    "version": "1",
    "files": [{
      "fileName":"example_file_name",
      "fileUrl":"https://test.s3.amazonaws.com/example+file+name.pdf"
    }],
    "priority": 50,
    "metadata": {
      "internal_id": "id_1234"
    }
}'
```

**`Example Response`**

```json Example Response
{
  "success": true,
  "workflowRuns": [
    {
      "object": "workflow_run",
      "id": "workflow_run_1234",
      "status": "PENDING",
      "metadata": {
        "internal_id": "id_1234"
      },
      "initialRunAt": "2023-01-01T09:41:00.000Z",
      "outputs": [],
      "workflow": {
        "object": "workflow",
        "id": "workflow_1234",
        "name": "test_workflow",
        "version": "1"
      }
    }
  ]
}
```