Add an SSH key
POST
Adds an SSH public key to the caller's account. It is then authorized for the caller's guest account on every Box they have a grant for, now and later.
- Only
ssh-ed25519keys are accepted. Send one line in OpenSSH format, as in~/.ssh/id_ed25519.pub:ssh-ed25519, the base64 key and an optional comment. - The key is stored as
ssh-ed25519and the base64 key. The rest of the line becomes itscomment, cut to 200 characters.
List your SSH keys returns the full keys.
It needs a sign-in session; API keys are refused. See SSH into a Box.
sessionheader
AuthorizationBearer <token>A sign-in session token (jvs_…) from the Dashboard, cubicle login or the device authorization flow.
application/json- body
publicKey*stringLength
length <= 1000The key is added.
application/json- response
id*stringThe key's ID, used to remove it.
Format
uuidfingerprint*stringThe key's SHA-256 fingerprint, as ssh-keygen -l prints it (SHA256:…).
createdAt*stringWhen the key was added (ISO 8601, UTC).
curl -X POST 'https://api.cubicle.sh/v1/keys' \ -H 'Content-Type: application/json' \ -d '{ "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIq5sz0buTLsmQ/57RQ86GwP2iIh5VrYHXVPY4ACn8xH ada@laptop"}'Example Response
{ "id": "1d3f5b7d-9f1b-4c3d-a5f7-5b7d9f1a3c6e", "fingerprint": "SHA256:DR+VtH2CFcmbwFuSvbFDPP8Twxmp78l6+a+IUVna6C4", "createdAt": "2026-11-02T08:30:00.000Z"}
