Skip to main content

DELETE /utils/{user_id}

Delete a user.

Deletes a specific user and all associated items from the system. This operation requires superuser privileges and prevents users from deleting their own accounts.

Endpoint​

DELETE /utils/{user_id}

Parameters​

NameTypeDescription
user_iduuid.UUIDThe unique identifier of the user account to be deleted.
sessionSessionDepThe database session dependency used to perform the deletion.
current_userCurrentUserThe currently authenticated user performing the request, used for self-deletion validation.

Response​

StatusDescription
200The user and their related items were successfully removed. Returns Message.
404The specified user ID does not exist in the database. Returns JSON.
403The request was denied because a superuser attempted to delete their own account. Returns JSON.