v2

latestSwagger 2.02026-08-01331211921.0 KB
SSH

Update a SSH key

Updates a specific SSH public key on a user's account

Note: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again.

Example:

$ curl -X PUT -H "Content-Type: application/json" -d '{"label": "Work key"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}
put/users/{selected_user}/ssh-keys/{key_id}

Request body

typestring required
uuidstring

The SSH key's immutable ID.

keystring

The SSH public key value in OpenSSH format.

commentstring

The comment parsed from the SSH key (if present)

labelstring

The user-defined label for the SSH key

created_onstring date-time
last_usedstring date-time
expires_onstring date-time
fingerprintstring

The SSH key fingerprint in SHA-256 format.

Response

The newly updated SSH key.

typestring required
uuidstring

The SSH key's immutable ID.

keystring

The SSH public key value in OpenSSH format.

commentstring

The comment parsed from the SSH key (if present)

labelstring

The user-defined label for the SSH key

created_onstring date-time
last_usedstring date-time
expires_onstring date-time
fingerprintstring

The SSH key fingerprint in SHA-256 format.