---
title: "Cancel an upload job"
method: POST
path: "/v1/projects/{project_id}/jobs/{job_id}/cancel"
tags: ["Projects / Jobs"]
---

# Cancel an upload job

`POST /v1/projects/{project_id}/jobs/{job_id}/cancel`

## Request

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

Stop a job that is still `PENDING` or `RUNNING`. A job that is already final answers `409`.

## Path parameters

- `project_id` string, required
- `job_id` string, required

## Response `200`

Successful Response

- JobCancelResponse
  - `job` JobPublic, required
    - `id` string, required
    - `status` string, required
    - `state` string, nullable
    - `blueprint_id` string, required
    - `filename` string, required
    - `progress` integer
    - `error_code` string, nullable
    - `error_message` string, nullable
    - `page_index` integer, nullable: The page of the uploaded file this job reads, 0-based. `null` until the page is cut from the upload.
    - `auto_rotation` integer, nullable: Degrees clockwise (0, 90, 180, 270) Kamai turned this page at upload to bring it upright; 0 = left as the PDF had it. `null` until the page is cut, or when the check did not run. The sheet carries the same value (`auto_rotation` on GET /v1/blueprints/{id}).
  - `message` string

## Other responses

- `404`: No such job in this project.
- `409`: The job is already final (SUCCEEDED, FAILED, CANCELLED or ABANDONED).
- `422`: Validation Error

---

[API](https://skmtc.dev/kamai/apis/kamai-api.md) · [All operations](https://skmtc.dev/kamai/apis/kamai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kamai/apis/kamai-api/revisions/78f938546270?raw)
