Delete authenticated user account
DELETE
/account
const url = 'http://localhost:8000/api/v1/account';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"confirm_delete":true,"reason":"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 http://localhost:8000/api/v1/account \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "confirm_delete": true, "reason": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
confirm_delete
required
Must be true to confirm deletion
boolean
reason
Reason for account deletion
string
Example generated
{ "confirm_delete": true, "reason": "example"}Responses
Section titled “ Responses ”Account deleted successfully
Media type application/json
object
success
boolean
message
string
data
null
Example
{ "success": true, "message": "Account deleted successfully."}Unauthorized
Forbidden
Validation error