API reference · Agents

Rotate the publishable key

POSThttps://goblins-call-api.onrender.com/v1/agents/:id/rotate-public-key

Replaces the key the agent’s call button uses. Pages that still carry the old one can no longer start calls.

Needs a workspace API key.

Path parameters

idstringRequired

The agent’s ID, such as ua_3f9a1c2b.

Errors

404

No agent in your workspace has that ID.

Every request can also answer 401, 429 and 500: see Errors.

Notes

  • The agent’s secret key and its embed settings are left as they are.
curl -X POST "https://goblins-call-api.onrender.com/v1/agents/ua_3f9a1c2b/rotate-public-key" \
  -H "Authorization: Bearer $CRACKLE_API_KEY"
Response · 200 OK
{
  "publicKey": "pk_…",
  "agent": { "id": "ua_3f9a1c2b", "publicKey": "pk_…", … }
}