Keypairs
Create key pair
Create a new SSH key pair.
x-api-key<token>
In: header
Public key details for creation.
namestring
Length
1 <= length <= 255public_keystring
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://cloud.huddleapis.com/api/v1/keypairs" \ -H "Content-Type: application/json" \ -d '{ "name": "prod-bastion-key", "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBexamplekey user@example.com" }'{
"id": "kp-f3d1a2b",
"name": "prod-bastion-key",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBexamplekey user@example.com",
"fingerprint": "3b:16:6a:2e:21:c6:be:3e:54:aa:94:63:34:fc:d1:1a",
"created_at": "2024-03-18T10:20:00Z"
}{
"message": "Bad request",
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request body",
"type": "client"
},
"timestamp": "2024-03-18T10:22:00Z"
}{
"message": "Resource conflict",
"error": {
"code": "CONFLICT",
"message": "Keypair with this name already exists",
"type": "conflict"
},
"timestamp": "2024-03-18T10:22:00Z"
}{
"message": "Internal server error",
"error": {
"code": "INTERNAL_ERROR",
"message": "Failed to create instance",
"type": "server"
},
"timestamp": "2024-03-18T10:22:00Z"
}