---
title: "Cancel job"
method: POST
path: "/jobs/{id}/cancel"
tags: ["Jobs"]
---

# Cancel job

`POST /jobs/{id}/cancel`

## Request

- Base URL: `https://app.buildworkpro.com/api/v1`
- URL: `https://app.buildworkpro.com/api/v1/jobs/{id}/cancel`
- Auth: HTTP bearer

Cancels a queued or running job. Already-terminal jobs return 409.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string, uuid

## Response `200`

Cancelled

- object
  - `data` Job, required
    - `id` string, required
    - `type` string, required
    - `resourceType` string, required
    - `status` string, required
    - `progress` JobProgress
      - `processed` integer, required
      - `total` integer, required
      - `errorsCount` integer, required
    - `params` unknown
    - `result` unknown
    - `errorMessage` string, nullable
    - `createdAt` union, required
      - string, date-time
      - string
    - `startedAt` union
      - string, date-time
      - string
    - `completedAt` union
      - string, date-time
      - string
    - `expiresAt` union, required
      - string, date-time
      - string
  - `meta` ResponseMeta, required
    - `request_id` string: Server-generated request identifier
    - `pagination` PaginationMeta
      - `cursor` string, nullable, required: Opaque cursor for the next page; null when no more results
      - `has_more` boolean, required: Whether more pages are available after this one
      - `count` integer, required: Items in this page

## Other responses

- `404`: Not found
- `409`: Job already terminal

---

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