API reference · Agents
Rotate an agent’s key
POST
https://goblins-call-api.onrender.com/v1/agents/:id/rotate-keyReplaces the agent’s own key with a new one. The old key stops working within a few seconds.
Needs a workspace API key.
Path parameters
idstringRequiredThe agent’s ID, such as ua_3f9a1c2b.
Errors
404No agent in your workspace has that ID.
Every request can also answer 401, 429 and 500: see Errors.
Notes
- This is the agent’s key, not a workspace key. Workspace keys are created and revoked in the studio, under API keys.
curl -X POST "https://goblins-call-api.onrender.com/v1/agents/ua_3f9a1c2b/rotate-key" \
-H "Authorization: Bearer $CRACKLE_API_KEY"Response · 200 OK
{
"apiKey": "gs_agent_…",
"agent": { "id": "ua_3f9a1c2b", "apiKey": "gs_agent_…", … }
}