Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
VMs

Attach an org SSH key to a VM

POST
/v1/vms/{id}/ssh-keys
AuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer vl_….

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/vms/string/ssh-keys" \  -H "Content-Type: application/json" \  -d '{    "sshKeyId": "string"  }'
Empty
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}

Command line

The orl CLI wraps this endpoint:

orl vms ssh-key attach <id> --ssh-key-id <ssh-key-id>