Skip to main content
POST
/
boxes
/
{boxId}
/
sshkey
Configure box SSH key
curl --request POST \
  --url https://ascii.dev/api/box/v1/boxes/{boxId}/sshkey \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>"
}
'
{
  "ok": true,
  "type": "ssh_key.configured",
  "success": true,
  "machineIp": "203.0.113.10",
  "sshUser": "user"
}

Authorizations

Authorization
string
header
required

Box API key in the form box_.... Create and rotate keys in the Box dashboard or through the v1 API key endpoints.

Path Parameters

boxId
string
required

Public Box id returned by create/list/get box calls.

Pattern: ^bx_[23456789abcdefghjkmnpqrstuvwxyz]{8}$

Body

application/json
key
string
required

Public SSH key in OpenSSH format. Private keys are rejected.

Example:

"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... user@host"

Response

SSH key setup result.

ok
boolean
required
Example:

true

type
string
required

Stable success envelope discriminator added by v1.

success
boolean
machineIp
string | null
sshUser
string
Example:

"user"