curl --request DELETE \
--url https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ssh_key": {
"id": "77777777-7777-4777-8777-777777777777",
"organization_id": "22222222-2222-4222-8222-222222222222",
"tenant_id": "22222222-2222-4222-8222-222222222222",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyMaterialForDocsOnly0000000000 dev@example.com",
"fingerprint": "SHA256:ExampleFingerprintForDocumentationOnly000000",
"label": "laptop",
"status": "revoked",
"created_at": "2026-10-14T12:00:00Z",
"revoked_at": "2026-10-15T08:00:00Z"
},
"machines": []
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": "SSH key not found."
}{
"error": "rate_limited",
"retry_after": 42,
"detail": "Too many requests. Try again in 42 seconds."
}{
"code": "<string>",
"detail": "<string>"
}Revoke an organization SSH key
Revokes one organization SSH key immediately. Ornn then makes a best-effort attempt, for up to 30 seconds before responding, to remove the key from your organization’s VM and Bare Metal reservations and to queue the remaining keys for their machines. Removal takes effect when each machine applies the update; a successful response does not confirm removal from every machine. Existing SSH sessions stay connected. Add or push a replacement key before revoking a key you still need. Revoking an already revoked key returns 200 again. Requires an approved organization.
curl --request DELETE \
--url https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/organizations/{organization_id}/ssh-keys/{key_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ssh_key": {
"id": "77777777-7777-4777-8777-777777777777",
"organization_id": "22222222-2222-4222-8222-222222222222",
"tenant_id": "22222222-2222-4222-8222-222222222222",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyMaterialForDocsOnly0000000000 dev@example.com",
"fingerprint": "SHA256:ExampleFingerprintForDocumentationOnly000000",
"label": "laptop",
"status": "revoked",
"created_at": "2026-10-14T12:00:00Z",
"revoked_at": "2026-10-15T08:00:00Z"
},
"machines": []
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": "SSH key not found."
}{
"error": "rate_limited",
"retry_after": 42,
"detail": "Too many requests. Try again in 42 seconds."
}{
"code": "<string>",
"detail": "<string>"
}ornn ssh-keys delete <key-id>.Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
Your organization ID, from the organizations array of GET /v1/auth/session.
Organization SSH key ID.
Was this page helpful?