---
title: "Delete managed key by ID."
method: DELETE
path: "/_fabric/{fabric}/_api/kms/managedkey/{id}"
tags: ["Managed Keys"]
---

# Delete managed key by ID.

`DELETE /_fabric/{fabric}/_api/kms/managedkey/{id}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/kms/managedkey/:id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Set the managed key to status = `DELETING` or completely delete it returning status = `DELETED` if the key doesn't have encoded data.

## Path parameters

- `fabric` string, required
- `id` string, required

## Response `200`

Successfully fetched the managed key.

- GetManagedkeyExamplesRc200
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `code` integer: The generated response code.
  - `result` object
    - `id` string
    - `name` string
    - `keyOptions` object
      - `masterKeyIds` unknown[]
        - unknown
    - `managedKeyType` string
    - `keyProvider` string
    - `tenant` string
    - `fabric` string
    - `createdAt` number
    - `updatedAt` number
    - `status` string
    - `description` string

## Other responses

- `401`: Failed because you do not have administrator permissions.
- `403`: Failed due to credentials restrictions.
- `404`: Failed to find specified managed key.
- `412`: Failed due to missing or malformed data. Verify that all parameters are complete.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
