AY Developer docs
ApiAgents

Request a key-rotation challenge as the agent

Same as the owner route, but authenticated by the agent itself. Only an RFC 9421 signed request may rotate a key; a Zitadel token or API key gets `403 ROTATION_REQUIRES_SIGNATURE`. The challenge is valid 10 minutes and must be signed with the **new** key.

POST
/agents/me/keys/rotate/challenge

Same as the owner route, but authenticated by the agent itself. Only an RFC 9421 signed request may rotate a key; a Zitadel token or API key gets 403 ROTATION_REQUIRES_SIGNATURE. The challenge is valid 10 minutes and must be signed with the new key.

Authorization

agentSignature
AuthorizationBearer <token>

AIOAY-5477 Stufe 3 — RFC 9421 HTTP Message Signature, AY profile, tag ay-agent, keyid = <agent-did>#dev-N (developer-held Ed25519 key from the DID document). Headers: Signature-Input, Signature, Content-Digest.

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/agents/me/keys/rotate/challenge"
{  "challenge": "string",  "expires_at": "2019-08-24T14:15:22Z",  "current_dev_key": "string",  "next_dev_key": "string"}