Open In App

How to create and send POST requests in Postman?

Last Updated : 17 Dec, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Postman is an API(application programming interface) development tool which helps to build, test and modify APIs. It can make various types of HTTP requests(GET, POST, PUT, PATCH), saving environments for later use, and convert save the API to code for various languages(like JavaScript, and Python). In this article, we will learn how you create and send GET requests in Postman.

Prerequisites:

Steps to create and send POST requests in Postman

Step 1: After downloading and installing the Postman, open the software. Add a new Collection and give it a name like “GFG”.

postman2

Step 2: When you hover, on the name of your collection, 3 dots will appear. Click on those 3 dots, and then click on “Add new request”.

z159

Step 3: You need select “POST” request from the dropdown down menu as shown below.

z160

Step 4: Now You can simply paste the API in the space provided and click on Send. Output will be shown in the body with the status code; 201 (Created). Note: You will to pass the body of the object .

How to pass Body:

Lets suppose , our object body is JSON . Then select “Body -> raw -> JSON ” as shown below

z161

Step 5: Then hit the Send button.

Example

Lets suppose we can an API:

https://jsonplaceholder.typicode.com/users

We will send a POST request, with an object body

{
"name": "Nikita",
"username": "nikitamehrotra99",
"email": "nikz@gfg",
"address": {

"city": "Noida",
"zipcode": "300005"

},
"phone": "123456",
"website": "https://auth.geeksforgeeks.org/user/nikitamehrotra99"
}

Output:

Recording-2023-12-01-at-173013


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads