Delete user
Erase one app user whole - everything held for them and anything still on its way in - from your backend.
- Auth
- write key
- Cost
- 1 event; never refused for your plan
Erases everything held for the app user named in X-Alexein-User: every item, excerpt and fact, every version,
and anything still on its way in. It does what Delete app user does in the console, so an account deletion in
your app can erase the user's memory without anyone opening the console. See
Handling erasure requests.
It cannot be undone. A later add for the same id starts an empty memory. Like every erasure, it is
listed in the organisation's Deletion log. To erase only some of a
user's memory, use forget.
Headers
AuthorizationstringrequiredBearer tm_…. The key must read and write.
X-Alexein-UserstringrequiredThe app user to erase. See App users.
X-Request-IdstringYour id for this request, echoed on the response.
Body
(none)objectSend {}.
Response
userstringThe app user erased, as you sent it.
deletedbooleantrue. Keep the response, with the date, as your proof of the erasure.
Errors
400bad requestX-Alexein-User is missing or not a usable id.
401unauthorizedThe bearer is not a key this service issued.
403forbiddenthis key reads; writing takes a key that writes.
429too many requestsToo many requests in flight. Retry after Retry-After seconds. See Limits.
503unavailableThe service is busy or briefly unavailable. Retry after Retry-After seconds, or with backoff when
there is none.
curl https://api.alexein.ai/v2/memory/users/delete \
-H "Authorization: Bearer $ALEXEIN_API_KEY" \
-H "X-Alexein-User: user_42" \
-H "Content-Type: application/json" \
-d '{}'{
"user": "user_42",
"deleted": true
}