Cubicle

Add an SSH key

POST
/v1/keys

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-ed25519 keys 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-ed25519 and the base64 key. The rest of the line becomes its comment, 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.

Authorization

session
headerAuthorizationBearer <token>

A sign-in session token (jvs_…) from the Dashboard, cubicle login or the device authorization flow.

Request Body

application/json
  1. body
publicKey*string
Lengthlength <= 1000

Response Body

The key is added.

application/json
  1. response
id*string

The key's ID, used to remove it.

Formatuuid
fingerprint*string

The key's SHA-256 fingerprint, as ssh-keygen -l prints it (SHA256:…).

createdAt*string

When the key was added (ISO 8601, UTC).

Example Request
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"}