DELETE

What is it?

DELETE is an HTTP method used to remove a resource from the server. Like GET and PUT, DELETE is idempotent, meaning deleting the same resource multiple times has the same effect: the resource is gone. After successful deletion, servers typically respond with 200 OK including a confirmation message, 204 No Content with an empty body, or 202 Accepted if deletion is queued for later.

Practical example

When a user clicks Delete Account and confirms the action in a modal, the frontend sends DELETE /api/users/123. The server first verifies the requesting user has permission to delete this account, then removes the user record from the database or marks it as deleted for soft deletes, cleans up related data like posts and comments, invalidates sessions, and responds with 204 No Content. The frontend redirects to a logout page.

Test your knowledge

What should a successful DELETE request typically return?

Ask Lex
Lex knows the context of this term and can give targeted explanations, examples, and extra context.
Tip: Lex replies briefly in the widget. For more detail, go to full screen mode.

Learn our language

Learn these terms from real professionals and take your skills further at KdG MCT.

Study at KdG