---
title: "Unassign a KMS key assignment"
method: PATCH
path: "/{tenantId}/kms/assignments/{assignmentId}"
tags: ["Assignments"]
---

# Unassign a KMS key assignment

`PATCH /{tenantId}/kms/assignments/{assignmentId}`

Marks an assignment inactive, revoked, or rotated without deleting key material. Assignment state affects service key resolution and key deletion protection.

## Request body

- UnassignKmsKeyArgs — Request body for updating an assignment status. Path parameters supply tenant and assignment ids.
  - `status` 'ACTIVE' | 'ROTATED' | 'REVOKED' | 'INACTIVE' — Lifecycle status for a key assignment.

## Response `200`

Updated key assignment.

- KmsKeyAssignment — Assignment linking a KMS key alias to a service and optional software party.
  - `assignmentId` string, required
  - `tenantId` string, required
  - `providerId` string, required
  - `keyAlias` string, required
  - `classification` 'PLATFORM' | 'TENANT' | 'APPLICATION' | 'SERVICE', required — Operational ownership scope for tenant-managed infrastructure resources.
  - `serviceType` string, nullable
  - `serviceInstance` string, nullable
  - `partyId` string, nullable
  - `relationshipType` string, nullable
  - `purpose` string, required
  - `validFrom` string, date-time, nullable
  - `validUntil` string, date-time, nullable
  - `status` 'ACTIVE' | 'ROTATED' | 'REVOKED' | 'INACTIVE', required — Lifecycle status for a key assignment.
  - `targetProviderId` string, nullable
  - `createdAt` string, date-time, nullable
  - `updatedAt` string, date-time, nullable

## Other responses

- `400` — Bad request due to invalid input parameters or request body.
- `404` — The requested resource was not found.
- `409` — The requested operation conflicts with the current KMS lifecycle state, active assignments, deletion protection, or migration/rotation state.
- `500` — An unexpected error occurred on the server.

## Changes

- **2026-06-26** `f4b160fd91dc` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sphereon-opensource/apis/kms-rest-server-api/changes/:tenantId/kms/assignments/:assignmentId/patch.md)

---

[API](https://skmtc.dev/sphereon-opensource/apis/kms-rest-server-api.md) · [All operations](https://skmtc.dev/sphereon-opensource/apis/kms-rest-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sphereon-opensource/kms-rest-server-api/revisions/e9136cbde1c1/schema)
