POST /users/{selected_user}/ssh-keys
Adds 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
Servers
- https://api.bitbucket.org/2.0
Path parameters
Name | Type | Required | Description |
---|---|---|---|
selected_user |
String | Yes |
This can either be an Atlassian Account ID OR the UUID of the account,
surrounded by curly-braces, for example: |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
expires_on |
String | No |
The date or date-time of when the key will expire,
in ISO-8601 format.
Example: |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
comment |
String | No |
The comment parsed from the SSH key (if present) |
expires_on |
String | No | |
key |
String | No |
The SSH public key value in OpenSSH format. |
fingerprint |
String | No |
The SSH key fingerprint in SHA-256 format. |
uuid |
String | No |
The SSH key's immutable ID. |
label |
String | No |
The user-defined label for the SSH key |
created_on |
String | No | |
type |
String | Yes | |
last_used |
String | No | |
links |
Object | No | |
links.self |
Object | No |
A link to a resource related to this object. |
links.self.href |
String | No | |
links.self.name |
String | No |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.