curl --request DELETE \
--url https://api.humanos.tech/agents/keys/{did}/{keyId}import requests
url = "https://api.humanos.tech/agents/keys/{did}/{keyId}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.humanos.tech/agents/keys/{did}/{keyId}', 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.humanos.tech/agents/keys/{did}/{keyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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.humanos.tech/agents/keys/{did}/{keyId}"
req, _ := http.NewRequest("DELETE", url, nil)
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.humanos.tech/agents/keys/{did}/{keyId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.humanos.tech/agents/keys/{did}/{keyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"ok": true,
"revoked": [
"did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1"
]
}{
"statusCode": 400,
"message": "did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1 is already revoked",
"error": "Bad Request"
}{
"statusCode": 404,
"message": "unknown key did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-9",
"error": "Not Found"
}Revoke Key
Kill one key: the agent and its other keys keep working. Revoking a key is not retiring an agent
With reason=compromised, every key this one authorized by self-service (the successor it rotated to, siblings it added) is revoked with it (v0.3 §16.5)
curl --request DELETE \
--url https://api.humanos.tech/agents/keys/{did}/{keyId}import requests
url = "https://api.humanos.tech/agents/keys/{did}/{keyId}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.humanos.tech/agents/keys/{did}/{keyId}', 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.humanos.tech/agents/keys/{did}/{keyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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.humanos.tech/agents/keys/{did}/{keyId}"
req, _ := http.NewRequest("DELETE", url, nil)
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.humanos.tech/agents/keys/{did}/{keyId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.humanos.tech/agents/keys/{did}/{keyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"ok": true,
"revoked": [
"did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1"
]
}{
"statusCode": 400,
"message": "did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1 is already revoked",
"error": "Bad Request"
}{
"statusCode": 404,
"message": "unknown key did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-9",
"error": "Not Found"
}Headers
Pin request, response, and webhook shapes to a specific dated API version (YYYY-MM-DD). Omit to use the version pinned to your API key (set when the key is created; new keys default to the latest version). New integrations should target the latest version.
^\d{4}-\d{2}-\d{2}$"2026-10-16"
Path Parameters
The agent's DID, URL-encoded.
"did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35"
The key id (<did>#key-<n>), URL-encoded: its # sent as %23.
"did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1"
Query Parameters
Why; compromised cascades to what the key authorized.
"compromised"
Response
Returns the keys revoked, the named one first.