---
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.

---

[API](https://skmtc.net/azure/apis/communication-jobrouter.md) · [All operations](https://skmtc.net/azure/apis/communication-jobrouter/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/communication-jobrouter/versions/c06e8f55d8b7/schema)
