---
id: config-digital-wallet-open-id-delete-key
title: "Delete key"
description: "Deletes a key of the organisation. The wallet deletes only its record of the key. It never deletes the key in a key store of the organisation (`vault`, `gcp-kms`, `aws-kms`, `azure-key-vault`, `dpod`) or at a QTSP (`csc`)."
sidebar_label: "Delete key"
hide_title: true
hide_table_of_contents: true
api: eJztWF1v27gS/SsDPiWA/NEkBRbCYnGzdvbC2+4227jNQxxAjDiWuJFIlaTseg3998WQsiw7bntfL9ony+RwODwznDnDLRNoUyMrJ7ViMZtigQ4tcHjGDegluBxBm4wraTnJDGGeI6x5UaAD0UprVWxAOgsGU23Ebt0zboYwc6BwhaYTbmdAqnYX67TBU3vBWbLideGSCJIsrQbPpaVPvrbd5z+1wcEzbgadoKi0SM5BG+AOOPw1v7uFsyS1aXI+XKiF6plvcFlbski3xrUGuZw7kJYsrC3G3i6BS9qB5qO+GIfUoEDlJC9ISCpJppNMZdCicuEo+ylvGljHXW2hkNaBlZmysJYuj8Jkiz1XIK2tuUoxjK/QyKVMg0apYFnILHfBJQa58AtryzMEXaEJcg6LwsI6R4N77HeHI2i4Cl7vAJK2t1whCooHg59qtA6etNjEYFEJSLYLlmq1lKZcsBgWbHrz9mZ+s2BNEmyyaFYyxT3Q3s6gZ52j8gOkkAwqpbVSZd6G+90kGZtz2t/RohSNCwh0AfNUy8INpAoCk+vIj7Z/wOBKP6MF6SLgSvi51vsBdRpQuIbJ+7cECf21vERIc64yHMKBJe2WO+UpV0oHRWFXruwaDR0meT2+TOAs+Y3LAgVFGEl5IdrpUFEMb3ADJVc8wxKV63CTFmgDvuKy4E8FJufdIcLF4Rs7XCgWsc5fM8Hi4JRsKjPpeHHvj/uuQjUTwdFvcMMiVnHDS3RoLIsftkd54IOSn2oE6SN7KdH07jSLmCSZirucRUzxElnMnnEzEyxi5F9pULDYmRojZtMcS87iLXObigStM1JlrGkegzBa96sWG5I4tGESQiuEYbt9e0+74w5P7Jhq5VA5Usirqmjvy+hvS1q3Lw3ST39j6ggRQ3qdREuzb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McPvF+OJqeDl8RWsrbV3JVc+e0Ne1zZk4LAZdAfvxuPPjcefH487/4eNOW3odfnajquBSURLwWWfb8pkHtrpgUfvuQynggNOE9yElqYc65DVhwLKIxeH95jFiubaONG63T9ziB1M0DQ1/qtF4OhaxFTe+EAT6Iy19CxYveWHxK+nn7H3LkM/hG89LJw+8IyCKJDxdYDELB+ien5rHZscqvXFhbhJMGMxJw37tCzpPVCqsuE5TrNxXZfvssiUCEXtqH7JKT96Z4Wt6n+JrFrMFWzDvCF8AfcNA41tWcJXVPCP5oJnoB1GkQ9YVkGk/6Gwn8TgmYB04/nAnl/xMhecNbn7pxMPMFxd0pC9Ik3foVepfz+VuGA==
sidebar_class_name: "delete api-method"
info_path: docs/openid4vc-api/igrant-io-api-documentation
custom_edit_url: null
---

> **Build this with an AI coding agent.** Install the iGrant.io Agent Skills, then ask your agent to build the integration:
>
> ```bash
> npx skills add L3-iGrant/skills
> ```


import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<h1 className={"openapi__heading"}>Delete key</h1>

<MethodEndpoint method={"delete"} path={"/v2/config/digital-wallet/openid/key-management/keys/{keyId}"}></MethodEndpoint>



Deletes a key of the organisation. The wallet deletes only its record of the key. It never deletes the key in a key store of the organisation (`vault`, `gcp-kms`, `aws-kms`, `azure-key-vault`, `dpod`) or at a QTSP (`csc`).

The wallet refuses to delete a key that is in use: the default key, a key that a credential definition, a presentation definition or a status list signs with, or a key of an issuance or a verification in flight. The read key usage operation tells where the key is in use (`canDelete`).

This operation needs a request body: send `{"confirm": "DELETE"}`. The service refuses the request when the body is missing.

When the key has a test certificate of the built-in test CA, the test CA revokes it, and the wallet signs the new CRL in the same change. When the key of the test CA cannot sign, the answer is `503` (`Failed to sign the CRL of the test CA: Key management service is not available`) and the key stays.


## Request

<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"description":"Unique identifier of the key","in":"path","name":"keyId","required":true,"schema":{"type":"string"}}}></ParamsItem></ul></div></details><MimeTabs className={"openapi-tabs__mime"}><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-mime"}><h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3><strong className={"openapi-schema__required"}>required</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>

Confirmation of the delete operation.

</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"confirm"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`DELETE`]"} schema={{"type":"string","description":"Confirmation string. Set the value to `DELETE`.","enum":["DELETE"],"example":"DELETE"}}></SchemaItem></ul></details></TabItem></MimeTabs><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"204"} value={"204"}><div>

Key deleted successfully. The response body is empty.

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div></div></TabItem><TabItem label={"400"} value={"400"}><div>

The request body is missing, the confirmation string is not `DELETE`, or the key is the default key or is in use.

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"401"} value={"401"}><div>

Unauthorized

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"404"} value={"404"}><div>

The organisation has no key with this key ID.

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"500"} value={"500"}><div>

Internal server error

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"503"} value={"503"}><div>

The key has a test certificate, and the key of the test CA cannot sign the new CRL. The key stays.

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
      