TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/fastapi-CRUD-MongoDB/llms.txt
Use this file to discover all available pages before exploring further.
DELETE /users/{id} endpoint permanently removes a user document from the MongoDB local.user collection. The controller uses find_one_and_delete to atomically locate and delete the document matching the provided ObjectId. On success it returns an HTTP 204 No Content response with an empty body. If no document is found for the given id, the API raises HTTP 404 Not Found.
DELETE /users/{id}
Path Parameters
MongoDB ObjectId (24-character hex string) identifying the user document to delete. Example:
64a1b2c3d4e5f6789abcdef0.Example Request
Example Response
A successful deletion returns HTTP204 No Content with no response body.
The response body is intentionally empty on success (HTTP
204 No Content). No user object is returned — use GET /users/{id} before deletion if you need to capture the document’s data.Error Responses
404 Not Found
Returned when no user document exists for the providedid.