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

# Cancel Job

> Stop a queued or running import

Stop an import that is queued or still running. The contacts and prospects it has not
started are skipped. Everything it already imported (profiles, prospects, opportunities)
stays, and the job's status becomes `CANCELLED`.

Cancelling a job that is already cancelled is safe: it returns `200` with
`already_cancelled: true` and changes nothing. A job that already finished returns `409`.
Account research runs cannot be cancelled (`422`).

<Note>
  Also available to AI assistants as the `cancel_job` tool on the
  [MCP server](/mcp-server).
</Note>

## Path Parameters

<ParamField path="id" type="string" required>
  Job ID, from [List Jobs](/api-reference/list-jobs) or the import that started it
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.clustr-ai.com/api/public/jobs/job_abc123/cancel" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

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

  requests.post(
      "https://api.clustr-ai.com/api/public/jobs/job_abc123/cancel",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
  )
  ```

  ```javascript JavaScript theme={null}
  await fetch("https://api.clustr-ai.com/api/public/jobs/job_abc123/cancel", {
    method: "POST",
    headers: { Authorization: "Bearer YOUR_API_KEY" },
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "job_id": "job_abc123",
      "status": "CANCELLED",
      "already_cancelled": false,
      "message": "Import cancelled. What it already imported stays."
    }
  }
  ```

  ```json 409 theme={null}
  {
    "success": false,
    "error": {
      "message": "run already finished (COMPLETED)",
      "code": "CONFLICT"
    }
  }
  ```
</ResponseExample>
