Skip to content

Delete an SSH Key

delete/v2/account/keys/{ssh_key_identifier}

To destroy a public SSH key that you have in your account, send a DELETE request to /v2/account/keys/$KEY_ID or /v2/account/keys/$KEY_FINGERPRINT. A 204 status will be returned, indicating that the action was successful and that the response body is empty.

Path ParametersExpand Collapse
ssh_key_identifier: number or string

A unique identification number for this key. Can be used to embed a specific SSH key into a Droplet.

Accepts one of the following:
SSHKeyID = number

A unique identification number for this key. Can be used to embed a specific SSH key into a Droplet.

SSHKeyFingerprint = string

A unique identifier that differentiates this key from other keys using a format that SSH recognizes. The fingerprint is created when the key is added to your account.

Delete an SSH Key
curl https://api.digitalocean.com/v2/account/keys/$SSH_KEY_IDENTIFIER \
    -X DELETE \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN"
Returns Examples