rotate_agent_key
Request a new bearer key for a specified Aidress agent; the old key stops working once the new key is claimed.
Instructions
Request rotation of an agent's bearer key — the previous key stops working the moment the new one is actually claimed (see claim_bearer_key).
Auth, in the order the server checks it:
Ed25519 signature (RFC 9421). Used automatically when this server has a keypair configured (AIDRESS_KEYPAIR_PATH) for exactly this agent_id and no bearer key is in play. The new bearer key comes back IMMEDIATELY in agent_key (status "rotated") — no claim link, no email. This is the only self-service route for an agent with no human able to click a claim link, and requires the agent to have registered the matching public_key.
Org key. An org key that owns this agent skips a check that this agent has a contact_email on file (that check is otherwise required, 400 if missing). On the hosted remote connector, send your org's X-API-KEY header on the MCP connection itself; locally, set AIDRESS_API_KEY in the server environment.
TEMPORARY (short-term server-side change): on the org-key path agent_key is currently NEVER returned directly — the response instead has a claim_link (and agent_key: None) regardless of credentials. Pass the token from that link to claim_bearer_key to actually mint and receive the key. The signature path above is unaffected.
agent_id — the agent whose bearer key to rotate.
Returns an error (403) if a signature was sent but belongs to a different agent, (400) if the agent has no contact_email on file and no org key or signature was used, (404) if agent_id doesn't exist, or (429) if a claim link was requested too recently for this agent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes |