Rotate an agent key (old key invalid immediately)
POST /api/v1/agents/{id}/rotate-key
Request
Parameters
id(path, string, required)
Responses
200
New key, shown once
key(string, required)
default
Error as { error: { code, message } }
error(object, required)code("unauthorized" | "forbidden" | "not_found" | "invalid" | "conflict" | "rate_limited" | "cross_site" | "upstream", required)message(string, required)
Example
curl -X POST \
-H "Authorization: Bearer cupof_uk_YOUR_KEY" \
https://cupof.ai/api/v1/agents/ID/rotate-key