> ## 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.

# Update Workflow Run

> You can update the name and metadata of an in progress WorkflowRun at any time using this endpoint.

### Parameters

<ParamField path="id" type="string">
  The ID of the WorkflowRun that was outputted after you created it using the
  /workflow\_runs endpoint.
</ParamField>

### Body

<ParamField body="name" type="string">
  An optional name that can be assigned to a specific WorkflowRun.
</ParamField>

<ParamField body="metadata" type="any">
  A metadata object that can be assigned to a specific WorkflowRun. If metadata
  already exists on the WorkflowRun, this new metadata object will be merged
  with it, with the new metadata taking field precedence.
</ParamField>

### Response

<ResponseField name="workflowRun" type="WorkflowRun">
  An object representing a WorkflowRun. See the [WorkflowRun
  object](/api-reference/objects/workflow_run) for the shape of the data.
</ResponseField>

<ResponseField name="Workflow" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      The Workflow ID that can be fetched from the Extend Platform.
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the Workflow.
    </ResponseField>

    <ResponseField name="version" type="string">
      The version of the Workflow.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location --request POST 'https://api-prod.extend.app/workflow_runs/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <API_TOKEN>' \
  --data '{
      "name": "test_workflow",
      "metadata": {
        "internal_id": "id_1234"
      }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Example Response theme={null}
  {
    "success": true,
    "workflowRun": {
      "object": "workflow_run",
      "id": "workflow_run_1234",
      "status": "PROCESSED",
      "metadata": {
        "internal_id": "id_1234"
      },
      "initialRunAt": "2023-01-01T09:41:00.000Z",
      "reviewedBy": "user_1234",
      "reviewedAt": "2023-01-10T05:39:14.500Z",
      "startTime": "2023-01-01T09:41:00.000Z",
      "endTime": "2023-01-10T05:39:24.500Z",
      "files": [
        {
          "object": "file",
          "id": "file_1234",
          "name": "example_file_name.pdf",
        }
      ],
      "outputs": [
        {
          "object": "document_processor_run",
          "id": "dpr_1234",
          "edited": true,
          "type": "EXTRACT",
          "initialOutput": {
            // Output object - see “Processor output types” for details
          },
          "reviewedOutput": {
            // Output object - see “Processor output types” for details
          },
          "output": {
            // Output object - see “Processor output types” for details
          }
        }
      ],
      "workflow": {
        "object": "workflow",
        "id": "workflow_1234",
        "version": "1",
        "name": "test_workflow"
      }
    }
  }
  ```
</ResponseExample>
