---
title: "Creates or updates a classification policy."
method: PATCH
path: "/routing/classificationPolicies/{classificationPolicyId}"
---

# Creates or updates a classification policy.

`PATCH /routing/classificationPolicies/{classificationPolicyId}`

Creates or updates a classification policy.

## Path parameters

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

- ClassificationPolicy — A container for the rules that govern how jobs are classified.
  - `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 a classification policy.
  - `name` string — Friendly name of this policy.
  - `fallbackQueueId` string — Id of a fallback queue to select if queue selector attachments doesn't find a match.
  - `queueSelectorAttachments` QueueSelectorAttachment[] — Queue selector attachments used to resolve a queue for a job.
    - `kind` 'conditional' | 'passThrough' | 'ruleEngine' | 'static' | 'weightedAllocation', required — Discriminators for supported queue selector attachment types.
  - `prioritizationRule` RouterRule — A rule of one of the following types: StaticRule: A rule providing static rules that always return the same result, regardless of input. DirectMapRule: A rule that return the same labels as the input labels. ExpressionRule: A rule providing inline expression rules. FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function. WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.
    - `kind` 'directMap' | 'expression' | 'function' | 'static' | 'webhook', required — Discriminators for supported router rule types.
  - `workerSelectorAttachments` WorkerSelectorAttachment[] — Worker selector attachments used to attach worker selectors to a job.
    - `kind` 'conditional' | 'passThrough' | 'ruleEngine' | 'static' | 'weightedAllocation', required — Discriminators for supported worker selector attachment 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/classificationPolicies/:classificationPolicyId/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)
