Skip to main content
POST
Add an SSH key to a sandbox

Authorizations

Authorization
string
header
required

An API key that starts with vms_. Make one in Settings > API keys.

Path Parameters

id
string
required
Example:

"sbx_06d8k3m7q2v9x4b1n5c0e8f2ja"

Body

application/json
publicKey
string
required

An OpenSSH public key: ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, or ssh-rsa with 2048 bits or more.

Required string length: 1 - 16384
Example:

"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINiCC4DtKiK4pnatEMwz9fpZks348+f9WnodyRCkr/al dev@example.com"

name
string
Required string length: 1 - 100

Response

The key is added.

id
string
required
Example:

"ssk_06d8k3m7q2v9x4b1n5c0e8f2ja"

sandboxId
string
required
Example:

"sbx_06d8k3m7q2v9x4b1n5c0e8f2ja"

name
string | null
required

The name of the key. The default is the key comment.

Example:

"dev@example.com"

publicKey
string
required

The key type and the key, without the comment.

Example:

"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINiCC4DtKiK4pnatEMwz9fpZks348+f9WnodyRCkr/al"

fingerprint
string
required

The SHA-256 fingerprint, as ssh-keygen -l shows it.

Example:

"SHA256:DbPhl9dNAPM0TB3+SLh/OdwIJ9Rtl3hGJU6s/NJyjOg"

createdAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$