Users & agents
Delete the account
Close an account created with POST /v1/agents/init, using its own key. Everything goes: the account, every key, project, memory, fact, webhook and audit event.
/v1/account?confirm=true
An account created by POST /v1/agents/init has no login: the key is the
account. This is how you close it. The delete is physical and cannot be undone, and the
key stops working as soon as the call returns.
An account you sign in to (the dashboard at agent.korely.ai, or the Korely app) does not close with a key, so a key that ends up in a log cannot delete an account. Close it from the dashboard: Settings, Close your account. That removes the Agents data and keys too.
To erase one of your customers instead, use DELETE /v1/users/{end_user}/memories.
Authentication
HTTP header, required: Authorization: Bearer kor_live_.... The key needs the memories:write scope.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
confirm | boolean | Required | Must be true. Without it, or with false, the call answers 400 confirmation_required and nothing is deleted. |
Example request
curl -X DELETE "https://api.korely.ai/v1/account?confirm=true" \ -H "Authorization: Bearer kor_live_..."Response
200 OK. What was removed, by table, only the tables that had rows.
{ "deleted": true, "removed": { "agent_facts": 31, "agent_memories": 12, "agent_audit_events": 58, "agent_api_keys": 1, "agent_rate_limits": 5, "agent_shadow_accounts": 1, "agent_projects": 1 }}Errors
| Status | Code | When |
|---|---|---|
400 | confirmation_required | confirm=true is missing or false. |
401 | invalid_key | Missing or invalid kor_live_ key. |
403 | forbidden | The key has no memories:write scope. |
409 | account_has_login | The account has a login: close it from the dashboard (Settings, Close your account). |
422 | invalid_request | confirm is not a boolean, for example confirm=maybe. |
429 | rate_limit_exceeded | Per-minute, per-hour or per-day request limit. Carries Retry-After. |