`DELETE /v1/me`: erase the caller (DAWG-170).
const url = 'https://api.updawg.net/v1/me';const options = { method: 'DELETE', headers: {'Content-Type': 'application/json'}, body: '{"confirm":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.updawg.net/v1/me \ --header 'Content-Type: application/json' \ --data '{ "confirm": "example" }'Anonymize-and-keep: their name and address are replaced, every way of
signing in is removed, and they leave every organization; what they did
stays in each organization’s record under “Former member”. See
db::erasure for exactly what is kept. Refused while they are the only
owner of an organization (sole-owner), and only in person: a session,
never an API token.
Request Bodyrequired
Section titled “Request Bodyrequired”What DELETE /v1/me needs: the caller’s own address, typed back.
object
The email address of the account being erased, exactly as it is. The one thing a stray click, a stolen CSRF token or a confused client cannot supply by accident.
Examplegenerated
{ "confirm": "example"}Responses
Section titled “Responses”Erased. The session cookie is cleared; nothing can sign in as this account again.
confirm is not this account’s email address.
object
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}No session.
object
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}The CSRF token is missing or wrong.
object
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}sole-owner: the caller is the only owner of an organization. Make somebody else an owner, or delete the organization, first.
object
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}