Skip to Content
ZITADEL Docs
APIsCore ResourcesV2Action

Remove Public Key

Removes the public key from the target. This is a permanent action and can not be undone. Note that you can only remove inactive keys. Attempting to remove an active key will result in an error. For break glass scenarios, deactivate the key first and then remove it. Removing a non-existing key is a no-op.

Required permission:

  • action.target.write
DELETE
/v2/actions/targets/{target_id}/publickeys/{key_id}

Path Parameters

target_id*target_id

TargetID is the unique identifier of the target to remove the public key from.

key_id*key_id

KeyID is the unique identifier of the public key to remove.

Response Body

Success

application/json
  1. response
deletionDate?deletion_date

DeletionDate is the timestamp of the public key removal.

Formatdate-time
Example Request
curl -X DELETE 'https://example.com/v2/actions/targets/string/publickeys/string'
Example Response200
{  "deletionDate": "2023-01-15T01:30:15.01Z"}

Was this page helpful?