SSH
Add a new SSH key
Changed onAdds a new SSH public key to the specified user account and returns the resulting key.
Example:
$ curl -X POST -H "Content-Type: application/json" -d '{"key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY user@myhost"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys
post/users/{selected_user}/ssh-keys
Request
- Base URLhttps://api.bitbucket.org/2.0
- URLhttps://api.bitbucket.org/2.0/users/{selected_user}/ssh-keys
- Auth
- OAuth 2Authorization code: https://bitbucket.org/site/oauth2/authorizeToken URL: https://bitbucket.org/site/oauth2/access_token scopes: account:write
- or HTTP basic
- or API key in header Authorization
Query parameters
expires_onstring
The date or date-time of when the key will expire, in ISO-8601 format. Example: YYYY-MM-DDTHH:mm:ss.sssZ
Request body
Response
The newly created SSH key.
Changes
- warning
removed the request property
/// - warning
removed the optional property
///from the response with the status - info
api tag
SSHadded - info
api tag
Sshremoved - info
added the new optional
queryrequest parameterexpires_on - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- warning