Skip to main content
POST
Add SSH Key to Instance

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Path Parameters

id
integer
required

ID of the instance to attach the SSH key to

Body

application/json
instance_id
integer

ID of the instance to attach the SSH key to; takes precedence over the id in the URL path.

Example:

12345

ssh_key
string

The SSH key to attach to the instance

Example:

"ssh-rsa AAAAB3NzaC1yc2EAAA..."

Response

Returns {success: true, msg: "SSH key added to instance.", key} on success, or {success: false, msg: "SSH key already associated with instance."} if already present.

success
boolean

True when key was added

msg
string

Human-readable message

key
string

JSON-encoded SSH key object (on success)