Skip to main content
POST
/
v1
/
ssh-public-keys
Create SSH Public Key
curl --request POST \
  --url https://api.dispersed.com/v1/ssh-public-keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... user@host",
  "is_default": true,
  "name": "Work Laptop"
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "fingerprint": "<string>",
  "is_default": true,
  "object": "ssh_public_key",
  "public_key": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "account": "<string>",
  "account_uuid": "<string>",
  "deleted_at": "2023-11-07T05:31:56Z",
  "last_used_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "uuid": "<string>"
}

Body

application/json
public_key
string
required

SSH public key in OpenSSH format

Minimum string length: 1
Example:

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

is_default
boolean

Whether this key should be set as the default SSH public key.

Example:

true

name
string

Optional label for this SSH public key

Maximum string length: 100
Example:

"Work Laptop"

Response

SSH public key created successfully

created_at
string<date-time> | null
required
fingerprint
string
required
is_default
boolean
required
object
enum<string>
required
Available options:
ssh_public_key
public_key
string
required
updated_at
string<date-time> | null
required
account
string | null
account_uuid
string | null
deleted_at
string<date-time> | null
last_used_at
string<date-time> | null
name
string | null
uuid
string | null