Skip to main content

Delete Account

DELETE /user

Description

Soft-deletes the authenticated user's account and clears related data. This route requires both the account password and the delete code requested through the auth flow.

Request Parameters

Requires Authentication: true

BODY

NameTypeRequiredDescription
passwordstringYesCurrent account password.
codestringYesDelete-account verification code sent by email.

Usage Example

await axios.delete("https://api.daykeeper.app/user", {
headers: {
Authorization: `Bearer ${accessToken}`,
},
data: {
password: "MyPassword123",
code: "123456",
},
})

Success Response

{
"message": "User deleted successfully",
"user": {
"_id": "65cbaab84b9d1cce41e98b60",
"status": "deleted"
},
"posts_likes": 2,
"comments": 4,
"comments_likes": 1,
"followers": 3,
"posts": 5,
"reports": 0,
"ban_history": 0
}

Error Response

CodeDescription
400Password or code missing
401Invalid password or verification code
403Password-based deletion not allowed for this account
404User not found
500Server error