Update Key
Updates the name of an existing key.
- HTTP request
- PUT /keys/{keyId}
- Authorization requirements
-
Header Type Required Description Authorizationstring Yes Bearer token used to authenticate the request. See Authentication flows for instructions on generating this token. X-DFNS-USERACTIONstring Yes User action signature used to authorize change-inducing requests. See User Action Signing flows for instructions on generating this signature. - Path parameter
-
Parameter Type Required Description keyId string Yes ID of the key to update. Minimum length: 1. - Request body
-
Field Type Required Description name string or null Yes New name for the key. Maximum length: 100. Set to nullto remove the existing name.curl --request PUT \ --url https://api.digitalassets.ibm.com/keys/{keyId} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-DFNS-USERACTION: <api-key>' \ --data ' { "name": "<string>" } ' - Response
- 200: Success
Example response:
{ "id": "key-01snl-t56gb-j8tsok0vn802p80i", "scheme": "ECDSA", "curve": "ed25519", "publicKey": "<string>", "status": "Active", "custodial": true, "dateCreated": "2023-04-14T20:41:28.715Z", "masterKey": true, "derivedFrom": { "keyId": "key-01snl-t56gb-j8tsok0vn802p80i", "path": "<string>" }, "name": "<string>", "imported": true, "exported": true, "dateExported": "2023-04-14T20:41:28.715Z", "dateDeleted": "2023-04-14T20:41:28.715Z" }