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

# Complete Workflow Run

> Finish a workflow run early

Mark a workflow run complete before the agent has finished conducting it. Outreach to the lead stops, queued messages are cancelled, and whatever the workflow had left to do is skipped. Completing is final.

If the workflow is configured to mark the lead completed, the lead is completed too and a [`lead.completed`](/api-reference/webhooks/events/lead-completed) webhook fires after [`workflow_run.completed`](/api-reference/webhooks/events/workflow-run-completed).

A workflow run also completes on its own, without this call, once the workflow has nothing left to do.

Completing a workflow run that is already `COMPLETED` succeeds and changes nothing.

## Authentication

Requires the `x-api-key` header with a valid workspace API key.

## Path Parameters

<ParamField path="workflowRunId" type="string" required>
  The workflow run to complete.
</ParamField>

This endpoint takes no body.

## Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="workflowRun" type="object">
  The workflow run in its new state. See
  [Get Workflow Run](/api-reference/workflow-runs/get-workflow-run) for the
  full shape.
</ResponseField>

## Errors

<ResponseField name="404" type="error">
  No workflow run with this id exists in your workspace.
</ResponseField>

<ResponseField name="409" type="error">
  The workflow run is already `CANCELLED`, or this workflow's runs cannot be
  completed manually. The error message says which.
</ResponseField>

<RequestExample>
  ```javascript Node.js theme={null}
  const options = {
    method: "POST",
    headers: { "x-api-key": "<your-api-key>" },
  };

  fetch(
    "https://api-v2.getomni.ai/api/v1/workflow-runs/5d8c1b2a-3e4f-5061-7283-94a5b6c7d8e9/complete",
    options,
  )
    .then((response) => response.json())
    .then((response) => console.log(response))
    .catch((err) => console.error(err));
  ```

  ```python Python theme={null}
  import requests

  url = "https://api-v2.getomni.ai/api/v1/workflow-runs/5d8c1b2a-3e4f-5061-7283-94a5b6c7d8e9/complete"
  headers = {"x-api-key": "<your-api-key>"}

  response = requests.request("POST", url, headers=headers)
  print(response.json())
  ```

  ```bash cURL theme={null}
  curl --request POST \
    --url https://api-v2.getomni.ai/api/v1/workflow-runs/5d8c1b2a-3e4f-5061-7283-94a5b6c7d8e9/complete \
    --header 'x-api-key: <your-api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "workflowRun": {
      "id": "5d8c1b2a-3e4f-5061-7283-94a5b6c7d8e9",
      "leadId": "b1f0a790-201b-47e9-84ed-cc7eed1270c5",
      "agentId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "workflowId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "COMPLETED",
      "createdAt": "2026-09-10T17:42:03.000Z",
      "completedAt": "2026-09-10T18:00:00.000Z",
      "cancelledAt": null
    }
  }
  ```
</ResponseExample>
