---
title: "Cancel a job"
method: POST
path: "/api/v1/jobs/{jobId}/cancel"
tags: ["Job Queue"]
---

# Cancel a job

`POST /api/v1/jobs/{jobId}/cancel`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v1/jobs/{jobId}/cancel`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v1/jobs/:jobId/cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

Sends an asynchronous cancellation request for the specified job. The job may still complete if it has already finished or cannot be interrupted.

## Path parameters

- `jobId` string, uuid, required

## Response `200`

Cancellation request accepted.

- ResponseEntityStringView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` string
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `401`: Unauthorized: Invalid or missing user authentication.
- `403`: Forbidden: User does not have permission to cancel this job.
- `404`: Not Found: Job with the specified ID does not exist or is already completed/cancelled.
- `500`: Internal Server Error: An unexpected error occurred while attempting to cancel the job.

## Changes

- **2026-10-30** `4fd8e917d458`: 1 breaking, 7 info
  - for the `path` request parameter `jobId`, the format changed from no format to `uuid`
  - api operation id `cancelJob` removed and replaced with `cancelJobQueueJob`
  - api tag `Job Queue` added
  - added the non-success response with the status `401`
  - …4 more

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v1/jobs/:jobId/cancel/post.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
