Register an SSH public key for a runtime
POST
/v1/runtimes/{runtime_id}/ssh-keys
const url = 'http://127.0.0.1:8080/v1/runtimes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ssh-keys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"public_key":"example","name":"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 http://127.0.0.1:8080/v1/runtimes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ssh-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "public_key": "example", "name": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”runtime_id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
public_key
required
An OpenSSH ssh-ed25519 public key.
string
name
string
Examplegenerated
{ "public_key": "example", "name": "example"}Responses
Section titled “Responses”SSH key registered
Media typeapplication/json
object
data
required
object
id
required
string format: uuid
runtime_id
required
string format: uuid
public_key
required
string
fingerprint
required
string
name
string
created_at
required
string format: date-time
Examplegenerated
{ "data": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "runtime_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "public_key": "example", "fingerprint": "example", "name": "example", "created_at": "2026-04-15T12:00:00Z" }}Missing, malformed, or rejected bearer token
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}The bearer token is not allowed to perform this action
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}The requested resource was not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}The request conflicts with current resource state
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}Validation or application error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}Rate limit exceeded
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}Upstream service is unavailable
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}Upstream request timed out
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}default
Section titled “default”Error response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "already_exists" }}