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
| Name | Type | Description |
|---|---|---|
| user_id | uuid.UUID | The unique identifier of the user account to be deleted. |
| session | SessionDep | The database session dependency used to perform the deletion. |
| current_user | CurrentUser | The currently authenticated user performing the request, used for self-deletion validation. |
Response
| Status | Description |
|---|---|
| 200 | The user and their related items were successfully removed. Returns Message. |
| 404 | The specified user ID does not exist in the database. Returns JSON. |
| 403 | The request was denied because a superuser attempted to delete their own account. Returns JSON. |