Skip to main content
POST
/
user
/
ssh-key
/
add
Create SSH key
curl --request POST \
  --url https://api.example.com/user/ssh-key/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "public_key": "<string>",
  "name": "my-laptop"
}
'
{
  "key_id": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for creating an SSH key.

public_key
string
required

SSH public key content in OpenSSH format.

Examples:

"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC... user@host"

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

name
string | null

Optional descriptive name to identify the SSH key (e.g., 'work-laptop', 'ci-cd-key'). If not provided, defaults to user's email.

Example:

"my-laptop"

Response

Successful Response

Response model for SSH key create endpoint.

key_id
string
required
message
string
required