en

HTTP DELETE is a request method that removes the resource identified by its URL. The client names the address and the server deletes the matching object and returns a result status.

Idempotency and statuses

DELETE is idempotent: the first request removes the resource, and repeated ones no longer change the state — the resource is simply gone. The server usually answers with 200 or 204 on success, or 404 if the object is not found. Like other HTTP methods, DELETE does not always carry a body — the URL itself is often enough. Deleting data should go over HTTPS so the request cannot be intercepted.

DELETE and CRUD

Together with the other methods, DELETE forms the CRUD set of operations that REST APIs are built on:

  • GET — reading (Read) data without changes.
  • POST — creating (Create) a new resource.
  • PUT — updating (Update), a full replacement of the resource.
  • DELETE — deleting (Delete) a resource by its address.

So the four methods cover the whole lifecycle of a resource — from creation to removal.

HTTP DELETE: removing a resource by its URL
Learn more

Tag cloud