POST
/dashboard/account/ssh-keys Create SSH key
Adds a new SSH public key.
Request Body
namestringRequiredName for the SSH key
keystringRequiredSSH public key
Response
200
400
successbooleanRequest
curl -X POST "https://api.royalehosting.net/dashboard/account/ssh-keys" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'Request
const response = await fetch("https://api.royalehosting.net/dashboard/account/ssh-keys", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "My Laptop",
"key": "ssh-rsa AAAAB3NzaC1yc2E... user@example.com"
}),
});
const data = await response.json();Request
import requests
response = requests.post(
"https://api.royalehosting.net/dashboard/account/ssh-keys",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"success": true
}