Add an SSH key for secure access

Add a new SSH key to your account. This is useful for providing secure access to your servers or other services that require SSH authentication. The API returns an ID that may be needed for subsequent operations.

Headers

Accept Example
Content-Type Example

Body

required
application/json
name string required
public_key string required

Responses

200
success boolean
timestamp string
requestId string
data object
400
error string
message string
code string
timestamp string
requestId string
500
error string
message string
code string
timestamp string
requestId string
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": "string",
    "public_key": "string"
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "ssh_key": {
      "success": true,
      "ssh_key": {
        "id": 0,
        "client_id": "string",
        "name": "string",
        "key": "string",
        "fingerprint": "string"
      },
      "call": "string",
      "server_time": 0,
      "info": [
        "string"
      ]
    }
  }
}
Request Body
{
  "name": "string",
  "public_key": "string"
}