curl --request POST \
--url https://api.humanos.tech/agents/self/challenge/{did}import requests
url = "https://api.humanos.tech/agents/self/challenge/{did}"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.humanos.tech/agents/self/challenge/{did}', 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/self/challenge/{did}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/self/challenge/{did}"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.humanos.tech/agents/self/challenge/{did}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.humanos.tech/agents/self/challenge/{did}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"regNonce": "k3Jd0Q7bXm2sVQ8hZ1pYt4Rc",
"exp": 1767225600000,
"ttl": 60,
"aud": "did:web:humanos.tech"
}{
"statusCode": 403,
"message": "self-service is for agents",
"error": "Forbidden"
}{
"statusCode": 404,
"message": "agent not found",
"error": "Not Found"
}Start Key Change
No API key: the agent calls this itself
Issue the single-use registration challenge under the agent’s operator organization, and the aud its PoP must carry (the platform DID)
One challenge authenticates one key change
curl --request POST \
--url https://api.humanos.tech/agents/self/challenge/{did}import requests
url = "https://api.humanos.tech/agents/self/challenge/{did}"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.humanos.tech/agents/self/challenge/{did}', 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/self/challenge/{did}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/self/challenge/{did}"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.humanos.tech/agents/self/challenge/{did}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.humanos.tech/agents/self/challenge/{did}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"regNonce": "k3Jd0Q7bXm2sVQ8hZ1pYt4Rc",
"exp": 1767225600000,
"ttl": 60,
"aud": "did:web:humanos.tech"
}{
"statusCode": 403,
"message": "self-service is for agents",
"error": "Forbidden"
}{
"statusCode": 404,
"message": "agent not found",
"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"
Response
Returns the single-use nonce, its expiry and the audience for the PoP.
Single-use nonce the registration evidence must embed.
"k3Jd0Q7bXm2sVQ8hZ1pYt4Rc"
Absolute expiry, epoch milliseconds.
1767225600000
Freshness window in seconds.
60
The platform's DID: the aud a registration proof names. The key being registered signs a via-reg+jwt over this and the nonce (v0.3 §16.5).
"did:web:humanos.tech"