Skip to main content
POST
/
api
/
v1
/
user
/
ssh-keys
Add SSH key
curl --request POST \
  --url https://cloud-api.phala.com/api/v1/user/ssh-keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "public_key": "<string>"
}
'
{
  "id": "<string>",
  "user_id": "<string>",
  "name": "<string>",
  "public_key": "<string>",
  "fingerprint": "<string>",
  "key_type": "<string>",
  "source": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "key_metadata": {},
  "last_synced_at": "<string>"
}

Body

application/json

Request model for creating an SSH key.

name
string
required

Human-readable name for the key

Required string length: 1 - 100
public_key
string
required

OpenSSH format public key

Response

Key created

SSH key details returned by API.

id
string
required

Key hashid

user_id
string
required

Owner user hashid

name
string
required

Human-readable name

public_key
string
required

OpenSSH format public key

fingerprint
string
required

SHA256 fingerprint

key_type
string
required

Algorithm (ed25519, rsa, etc)

source
string
required

Origin: manual or github

created_at
string
required

Creation timestamp

updated_at
string
required

Last update timestamp

key_metadata
Key Metadata · object

Extra data like bit length

last_synced_at
string | null

Last GitHub sync timestamp