v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_SSH Keys

Update an SSH Key's Name

To update the name of an SSH key, send a PUT request to either /v2/account/keys/$SSH_KEY_ID or /v2/account/keys/$SSH_KEY_FINGERPRINT. Set the name attribute to the new name you want to use.

put/v2/account/keys/{ssh_key_identifier}

Path parameters

integer required

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

OR
string required

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.

Example:512189

Either the ID or the fingerprint of an existing SSH key.

Request body

namestring

A human-readable display name for this key, used to easily identify the SSH keys when they are displayed.

Example request

{
  "name": "My SSH Public Key"
}

Response

A JSON object with the key set to ssh_key. The value is an ssh_key object containing the standard ssh_key attributes.

Example response

{
  "ssh_key": {
    "id": 512189,
    "fingerprint": "3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa",
    "public_key": "ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example",
    "name": "My SSH Public Key"
  }
}