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

---

[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)
