# Cancel a publishing job

Cancels a publishing job with a specific ID.
**Note**
To cancel a publishing job, your token must include one of the following
scopes: `xmcpub.jobs.a:w`, `xmcpub.jobs.t:w`, or `xmcpub.jobs.t:wl`.
Users with a scope of `xmcpub.jobs.t:wl` (limited write) must also have a
`Sitecore Client Advanced Publishing` or `Sitecore Client Publishing`
roles or have the `admin` flag set in the XM Cloud instance.
If access token includes only `xmcpub.jobs.t:wl` scope, callers
must be able to cancel only those publishing job which they started.
**Note**
Client tokens of applications must
have the `xmcloud.cm:admin` scope.

Endpoint: POST /authoring/publishing/v1/jobs/{jobId}/cancel
Version: v1.0
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `jobId` (string, required)
    The ID of the publishing job to cancel, for example `job_AE86B`.

## Response 202:

  - `202` (unknown)
    Job cancellation successfully requested.

## Response 400:

  - `400` (unknown)
    Invalid job ID

## Response 400 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized request or invalid access token

## Response 401 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 403:

  - `403` (unknown)
    Forbidden. Possible reasons:  - Authorization failed (required scopes and/or roles are missing). - Context tenant cannot be resolved from the access token.

## Response 403 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 404:

  - `404` (unknown)
    Job not found with the specified job ID

## Response 404 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 409:

  - `409` (unknown)
    Job does not have a `Queued` or `Running` status

## Response 409 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 501:

  - `501` (unknown)
    Job cancellation is not supported for XM Cloud Content

