How to Make PUT Request in Postman: Step-by-Step Guide
To make a
PUT request in Postman, select PUT from the HTTP method dropdown, enter the request URL, add any required headers and body data, then click Send. Postman will execute the request and show the response below.Syntax
A PUT request updates a resource at a specified URL. In Postman, you set the HTTP method to PUT, enter the URL, add headers like Content-Type, and provide the data to update in the request body.
- HTTP Method: PUT
- URL: The endpoint where the resource exists
- Headers: Metadata like content type (usually
application/json) - Body: The data to update, usually in JSON format
http
PUT https://api.example.com/resource/123 Headers: Content-Type: application/json Body: { "name": "New Name", "status": "active" }
Example
This example shows how to update a user's name and status using a PUT request in Postman.
json
{
"name": "John Doe",
"status": "active"
}Output
HTTP/1.1 200 OK
{
"id": 123,
"name": "John Doe",
"status": "active"
}
Common Pitfalls
- Forgetting to set the HTTP method to
PUTand leaving it asGETorPOST. - Not adding the correct
Content-Typeheader, causing the server to reject the body. - Sending an empty or malformed JSON body.
- Using the wrong URL or missing resource ID in the URL.
http
Wrong way: POST https://api.example.com/resource/123 Body: { "name": "New Name" } Right way: PUT https://api.example.com/resource/123 Headers: Content-Type: application/json Body: { "name": "New Name" }
Quick Reference
| Step | Action |
|---|---|
| 1 | Open Postman and select PUT method from dropdown |
| 2 | Enter the full URL of the resource to update |
| 3 | Go to Headers tab and add Content-Type: application/json |
| 4 | Go to Body tab, select raw and JSON format, then enter update data |
| 5 | Click Send to execute the PUT request |
| 6 | Check response status and body for confirmation |
Key Takeaways
Always select PUT method in Postman to update resources.
Set Content-Type header to application/json when sending JSON data.
Include the full URL with resource ID to target the correct item.
Provide a valid JSON body with the updated data.
Review the response to confirm the update was successful.