v2_ssh_keys_create
POST
/api/v2/ssh-keys/
const url = 'https://example.com/api/v2/ssh-keys/';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"title":"example","public_key":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v2/ssh-keys/ \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "title": "example", "public_key": "example" }'Register a new SSH public key for key-based VM access.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
title
required
string
public_key
required
string
Example generated
{ "title": "example", "public_key": "example"}object
title
required
string
public_key
required
string
Example generated
title=example&public_key=exampleobject
title
required
string
public_key
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
success
required
boolean
msg
object
msg_kind
string
msg_text
string
data
object
key
additional properties
Example generated
{ "success": true, "msg": { "msg_kind": "example", "msg_text": "example" }, "data": { "additionalProperty": "example" }}Media typeapplication/json
object
success
required
boolean
msg
object
msg_kind
string
msg_text
string
Example generated
{ "success": true, "msg": { "msg_kind": "example", "msg_text": "example" }}