0
0
PostmanHow-ToBeginner ยท 3 min read

How to Make DELETE Request in Postman: Step-by-Step Guide

To make a DELETE request in Postman, select DELETE from the HTTP method dropdown, enter the request URL, and click Send. You can add headers or body if needed, then check the response to confirm the resource was deleted.
๐Ÿ“

Syntax

The basic syntax for a DELETE request in Postman involves selecting the DELETE method, specifying the URL of the resource you want to delete, and optionally adding headers or a request body if the API requires it.

  • DELETE: HTTP method to remove a resource.
  • URL: The endpoint where the resource exists.
  • Headers: Optional metadata like authentication tokens.
  • Body: Rarely used, but some APIs accept data with DELETE.
http
DELETE https://api.example.com/items/123
๐Ÿ’ป

Example

This example shows how to delete an item with ID 1 from a sample API using Postman. It demonstrates setting the method, URL, and sending the request to get a response confirming deletion.

http
DELETE https://jsonplaceholder.typicode.com/posts/1
Output
{ "status": 200, "body": {} } // Response means the post with ID 1 was deleted successfully.
โš ๏ธ

Common Pitfalls

Common mistakes when making DELETE requests in Postman include:

  • Using the wrong HTTP method (e.g., GET or POST instead of DELETE).
  • Forgetting to include required authentication headers, causing authorization errors.
  • Not specifying the correct resource URL, leading to 404 errors.
  • Adding a request body when the API does not support it, which may cause errors.

Always check API documentation for required headers and URL format.

http
Wrong way:
POST https://api.example.com/items/123

Right way:
DELETE https://api.example.com/items/123
๐Ÿ“Š

Quick Reference

StepAction
1Open Postman and select the DELETE method from the dropdown.
2Enter the full URL of the resource to delete.
3Add any required headers (e.g., Authorization).
4Click the Send button to execute the request.
5Check the response status and body for confirmation.
โœ…

Key Takeaways

Select DELETE method and enter the correct resource URL in Postman.
Include necessary headers like authentication to avoid errors.
Verify the response status code to confirm successful deletion.
Avoid sending a request body unless the API explicitly requires it.
Always consult API docs for correct URL and header requirements.