Add and manage SSH keys for your account

Add SSH keys, which are necessary for securely connecting to your services like VPS. This endpoint returns an SSH key ID for subsequent calls, such as adding the key to HostBill. Ensure you have the public SSH key ready before using this.

Account & Settings SSH Keys

Context

Used in the dashboard

/cart/vps/[slug] /cart/en/vps/[slug] /ssh-keys

Workflow links

Headers

Accept Example
Content-Type Example

Body

required
application/json
name string required · Example: new-mi
public_key string required · Example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVYQU1QTEVfU1NIX0tFWV9EQVRBX09OTFk example@hostup

Responses

200
data object required
data.ssh_key object required
data.ssh_key.call string required · Example: addClientSsh
data.ssh_key.info array<string> required · Example: ["SSH Key added successfully"]
data.ssh_key.server_time integer required · Example: 1769759984
data.ssh_key.ssh_key object required
data.ssh_key.ssh_key.client_id string required · Example: 30000
data.ssh_key.ssh_key.fingerprint string required · Example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
data.ssh_key.ssh_key.id integer required · Example: 2959
data.ssh_key.ssh_key.key string required · Example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVYQU1QTEVfU1NIX0tFWV9EQVRBX09OTFk example@hostup
data.ssh_key.ssh_key.name string required · Example: new-mi
data.ssh_key.success boolean required · Example: true

True for successful responses.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

success boolean required · Example: true

True for successful responses.

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

400
code string required · Example: BAD_REQUEST

Machine-readable error code.

error string required · Example: Bad Request

HTTP status title (e.g. 'Bad Request').

message string required · Example: Failed to add SSH key

Human-readable message.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

POST https://cloud.hostup.se/api/ssh-keys
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/ssh-keys" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "new-mi",
    "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVYQU1QTEVfU1NIX0tFWV9EQVRBX09OTFk example@hostup"
  }'
Response
{
  "success": true,
  "timestamp": "2026-02-10T00:00:00.000Z",
  "requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
  "data": {
    "ssh_key": {
      "success": true,
      "ssh_key": {
        "id": 2959,
        "client_id": "30000",
        "name": "my-ssh-key",
        "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVYQU1QTEVfU1NIX0tFWV9EQVRBX09OTFk example@hostup",
        "fingerprint": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
      },
      "call": "addClientSsh",
      "server_time": 1769759984,
      "info": [
        "SSH Key added successfully"
      ]
    }
  }
}
Request Body Example 1
{
  "name": "new-mi",
  "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVYQU1QTEVfU1NIX0tFWV9EQVRBX09OTFk example@hostup"
}