---
title: "Cancel Import Job"
method: POST
path: "/api/v1/import/jobs/{job_id}/cancel"
tags: ["import"]
---

# Cancel Import Job

`POST /api/v1/import/jobs/{job_id}/cancel`

## Request

- Base URL: `https://api.maia-analytics.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maia-analytics.com/api/v1/import/jobs/{job_id}/cancel`
- Auth: HTTP bearer

Ask a running import to stop at its next chunk boundary.

Cooperative, never a DBOS hard cancel: the workflow observes the flag and
falls through to its normal finalize, so the rows that already resolved are
still committed. A hard cancel would skip that finalize entirely.

409 when the job already moved — a lost claim is an answer, not a retry.

## Path parameters

- `job_id` string, uuid, required

## Response `200`

Successful Response

- ImportJobResponse: One background import as the client polls and renders it. The field list lives on :class:`ImportJobSnapshot` so this and the pushed ``import_progress`` frame cannot describe the same row differently.
  - `id` string, uuid, required
  - `project_id` string, uuid, required
  - `status` 'pending' | 'running' | 'cancelling' | 'completed' | 'failed': Lifecycle of one background import. - PENDING: row inserted, workflow enqueued, no chunk resolved yet - RUNNING: the workflow claimed the job and is resolving chunks - CANCELLING: the user asked to stop; the workflow observes this at the next chunk boundary and falls through to a normal finalize. Cancel is cooperative, so this is an in-flight state, not a terminal one — the partial commit still has to happen. - COMPLETED: finalized, whether every row resolved or only some - FAILED: finalized with nothing committed, or the workflow raised
  - `total_rows` integer
  - `resolved_rows` integer
  - `committed_rows` integer
  - `shortfall_rows` integer
  - `failure_reason` string, nullable
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/maia-analytics/apis/maia-api.md) - [All operations](https://skmtc.dev/maia-analytics/apis/maia-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maia-analytics/apis/maia-api/revisions/bb508e935174?raw)
