Skip to content
  • Auto
  • Light
  • Dark

Delete

Delete an SSH Key
client.gpuDroplets.account.keys.delete(number | stringsshKeyIdentifier, RequestOptionsoptions?): void
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.

ParametersExpand Collapse
sshKeyIdentifier: number | 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:
number
string
Delete an SSH Key
import Gradient from '@digitalocean/gradient';

const client = new Gradient();

await client.gpuDroplets.account.keys.delete(512189);
Returns Examples