---
title: "Creates or updates a exception policy."
method: PATCH
path: "/routing/exceptionPolicies/{exceptionPolicyId}"
---

# Creates or updates a exception policy.

`PATCH /routing/exceptionPolicies/{exceptionPolicyId}`

Creates or updates a exception policy.

## Path parameters

- `exceptionPolicyId` string, required

## Query parameters

- `api-version` string, required

## Headers

- `If-Match` string
- `If-Unmodified-Since` string, date-time-rfc7231

## Response `200`

The request has succeeded.

- ExceptionPolicy — A policy that defines actions to execute when exception are triggered.
  - `etag` string, required — The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource. It lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed. It is a string of ASCII characters placed between double quotes, like "675af34563dc-tr34".
  - `id` string, required — Id of an exception policy.
  - `name` string — Friendly name of this policy.
  - `exceptionRules` ExceptionRule[] — A collection of exception rules on the exception policy.
    - `id` string, required — Id of an exception rule.
    - `trigger` ExceptionTrigger, required — Abstract base class for defining a trigger for exception rules.
      - `kind` 'queueLength' | 'waitTime', required — Discriminators for supported exception trigger types.
    - `actions` ExceptionAction[], required — A collection of actions to perform once the exception is triggered.
      - `id` string — Unique Id of the exception action.
      - `kind` 'cancel' | 'manualReclassify' | 'reclassify', required — Discriminators for supported exception action types.

## Other responses

- `201` — The request has succeeded and a new resource has been created as a result.
- `default` — An unexpected error response.

## Changes

- **2022-05-05** `8cbeaf5a7ce3` — 1 breaking, 5 warning, 2 info
  - removed the success response with the status `201`
  - the optional response header `ETag` removed for the status `200`
  - the optional response header `Last-Modified` removed for the status `200`
  - the optional response header `x-ms-error-code` removed for the status `default`
  - …4 more

[Change history](https://skmtc.dev/azure/apis/communication-jobrouter/changes/routing/exceptionPolicies/:exceptionPolicyId/patch.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-service-production.skmtc.workers.dev/v1/apis/azure/communication-jobrouter/revisions/c06e8f55d8b7/schema)
