curl --request POST \
--url https://api.storiza.store/sshkeys/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"publicKey": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', publicKey: '<string>'})
};
fetch('https://api.storiza.store/sshkeys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/sshkeys/"
payload = {
"name": "<string>",
"publicKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "SSH key added successfully",
"data": {
"id": "00000000-0000-4000-8000-000000000000",
"name": "laptop",
"userId": "00000000-0000-4000-8000-000000000000",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@laptop",
"algorithm": "ed25519",
"bits": 256,
"fingerprint": "SHA256:abcdef0123456789...",
"createdAt": "2026-10-09T14:57:33.969Z"
}
}Add an SSH public key to the signed-in user's account
Stores an SSH public key that can then be attached to any number of servers by passing sshKeyId when ordering a VPS. The key is parsed the way ssh-keygen -l parses it: the algorithm must be one OpenSSH still accepts, and the blob’s own header must agree with the prefix. A mismatch is rejected here rather than by sshd on a machine you can no longer reach.
The trailing comment is kept for display but stripped from what gets installed. Adding the same key twice returns 409 SSH_KEY_DUPLICATE — keys are compared by fingerprint, not by text, so re-pasting with a different comment is still a duplicate.
Never send a private key.
Required API key permission: account:write
curl --request POST \
--url https://api.storiza.store/sshkeys/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"publicKey": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', publicKey: '<string>'})
};
fetch('https://api.storiza.store/sshkeys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/sshkeys/"
payload = {
"name": "<string>",
"publicKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "SSH key added successfully",
"data": {
"id": "00000000-0000-4000-8000-000000000000",
"name": "laptop",
"userId": "00000000-0000-4000-8000-000000000000",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@laptop",
"algorithm": "ed25519",
"bits": 256,
"fingerprint": "SHA256:abcdef0123456789...",
"createdAt": "2026-10-09T14:57:33.969Z"
}
}Authorizations
An API key from the Storiza dashboard (API & Integrations), sent as Authorization: Bearer stz_….
Body
Response
SSH key added successfully
true SSH key added successfully Schema for SSHKey model
Show child attributes
Show child attributes
{
"id": "00000000-0000-4000-8000-000000000000",
"name": "laptop",
"userId": "00000000-0000-4000-8000-000000000000",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@laptop",
"algorithm": "ed25519",
"bits": 256,
"fingerprint": "SHA256:abcdef0123456789...",
"createdAt": "2026-10-09T14:57:33.969Z"
}
Was this page helpful?