---
title: "Submits request to cancel an existing job by Id while supplying free-form cancellation reason."
method: POST
path: "/routing/jobs/{jobId}:cancel"
---

# Submits request to cancel an existing job by Id while supplying free-form cancellation reason.

`POST /routing/jobs/{jobId}:cancel`

## Request

- Base URL: `{endpoint}`
- URL: `{endpoint}/routing/jobs/{jobId}:cancel`
- Auth: OAuth 2
  - Authorization code: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Token URL: `https://login.microsoftonline.com/common/oauth2/token` scopes: `https://communication.azure.com/.default`

Submits request to cancel an existing job by Id while supplying free-form cancellation reason.

## Path parameters

- `jobId` string, required

## Query parameters

- `api-version` string, required

## Request body

- CancelJobOptions: Request payload for cancelling a job.
  - `note` string: A note that will be appended to a job's Notes collection with the current timestamp.
  - `dispositionCode` string: Indicates the outcome of a job, populate this field with your own custom values. If not provided, default value of "Cancelled" is set.

## Response `200`

The request has succeeded.

- CancelJobResult: Response payload from cancelling a job.

## Other responses

- `default`: An unexpected error response.

## Changes

- **2022-05-05** `8cbeaf5a7ce3`: 1 warning, 2 info
  - the optional response header `x-ms-error-code` removed for the status `default`
  - api operation id `JobRouterOperations_CancelJob` removed and replaced with `JobRouter_CancelJobAction`
  - api tag `Jobs` added

[Operation history](https://skmtc.dev/azure/apis/communication-jobrouter/changes/routing/jobs/:jobId:cancel/post.md)

---

[API](https://skmtc.dev/azure/apis/communication-jobrouter.md) - [All operations](https://skmtc.dev/azure/apis/communication-jobrouter/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/communication-jobrouter/revisions/c06e8f55d8b7?raw)
