The Wayback Machine - https://web.archive.org/web/20240927193544/https://www.geeksforgeeks.org/how-to-create-and-send-post-requests-in-postman/
Open In App

How to create and send POST requests in Postman?

Last Updated : 29 Jul, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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:



Similar Reads

How to send different types of requests (GET, POST, PUT, DELETE) in Postman.
In this article, we are going to learn how can we send different types of requests like GET, POST, PUT, and DELETE in the Postman. Postman is a popular API testing tool that is used to simplify the process of developing and testing APIs (Application Programming Interface). API acts as a bridge between two software applications which enables them to
5 min read
How to create and send GET requests in Postman?
Postman is an API(application programming interface) development tool which helps to build, test and modify APIs. It has the ability to make various types of HTTP requests(GET, POST, PUT, PATCH), saving environments for later use, converting the API to code for various languages(like JavaScript, Python). In this article, we will learn How do you cr
1 min read
How to send Multiple Requests at same time in Postman ?
Postman is a popular API development tool that allows us to design, test, document, and debug APIs more efficiently. This article is all about sending multiple requests at the same time in Postman. Advantages of sending multiple requests at same time in Postman :Efficiency: It saves time and improves efficiency.Parallel Testing: Postman allows you
1 min read
How to Send WebSocket Requests with Postman ?
This article will show how to send WebSocket requests in Postman. Postman is a popular collaborative platform for API development. It offers different tools for designing, debugging, and testing an API, making it more efficient. WebSocket is an advanced technology used for real-time bidirectional communication between clients and servers. Postman a
3 min read
How to Use Postman for Sending POST Requests?
Understanding how to send a POST request in Postman is a crucial skill for any developer or tester. POST requests are typically used for submitting data to a server, such as creating new resources or uploading files. What is a POST Request?A POST request is an HTTP request method used for sending data to a target server. In RESTful APIs, POST reque
4 min read
How to create and write tests for API requests in Postman?
Postman is an API(utility programming interface) development device that enables to construct, take a look at and alter APIs. It could make numerous varieties of HTTP requests(GET, POST, PUT, PATCH), store environments for later use, and convert the API to code for various languages(like JavaScript, and Python). In this article, we will learn How t
3 min read
What are Postman Collections, and how do they organize requests?
Postman is a popular tool for working with APIs. It's user-friendly and has a cool feature called Collections. In this article, we will talk about what Collections are and how they help you organize and manage your API requests efficiently. PrerequisitesDownload and install PostmanBasic knowledge of Postman.We will discuss the following two approac
2 min read
How to make axios send cookies in its requests automatically?
Cookies are small pieces of data stored on the client's computer for various tasks. If we want to make Axios send cookies in its request automatically, then we can use the 'withCrendentials' options. We need to set it to true in our Axios configuration. This makes sure that cookies are included in both requests and responses. In this article, we wi
3 min read
How to Send FormData Objects with Ajax-requests in jQuery ?
In this article, we will see how can we send formData objects with Ajax requests by using jQuery. To send formData, we use two methods, namely, the FormData() method and the second method is serialize() method. The implementation of Ajax to send form data enables the submission of data to the server without the need for a page refresh, which is a p
4 min read
How to handle Conditional Requests/Branching in Postman ?
Conditional requests or branching in Postman allows you to create logic within your requests to handle different scenarios based on conditions. This feature is useful for executing specific actions or tests depending on the response received from an API endpoint. In this article, we'll explore how to handle conditional requests or branching in Post
3 min read
How to organize requests within a Postman Collection?
Postman is very useful for testing the APIs. It has a feature to organize requests within a collection. Whether you are a beginner or an experienced user, understanding how to structure your requests can drastically enhance your work of testing the endpoints. In this guide, we will explore step-by-step techniques to organize requests effectively us
2 min read
How to test query strings in Postman requests ?
To test query strings in Postman requests, we only need to simply enter the key and value of each parameter and Postman will append them to the URL automatically. To the end of the request URL, the parameters are appended using '?' and key-value pairs are separated by '&'. e.g. :- ?id=22&type=vivekPrerequisitesYour system must have Postman
3 min read
How to perform DELETE requests in Postman?
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), save environments for later use, and convert the API to code for various languages(like JavaScript, and Python). In this article, we will learn how you create and send G
2 min read
Explain the use of environment variables in Postman requests.
Postman is a powerful API development tool which offers a feature known as environment variables. These variables are used for efficiently testing and development of APIs by allowing users to manage dynamic values across requests easily. Table of Content What are Environment Variables in Postman?Advantages of Using Environment VariablesHow to Use E
2 min read
How to link data files to requests in Postman for iterative testing?
Postman may be beneficial when trying out APIs that require file uploads or while sending complicated JSON payloads. In this article, you will explore the way to upload documents in Postman and alternative approaches to make it well. Let's dive in. In the area of API testing and development, managing file uploads is a fundamental duty. Postman, a u
2 min read
How to pass parameters in Postman requests?
Postman is an API(application programming interface) development tool that helps to build, test and modify APIs. It can make various types of HTTP requests(GET, POST, PUT, PATCH), save environments for later use, and convert the API to code for various languages(like JavaScript, and Python). In this article, we will learn how you pass parameters in
2 min read
GET and POST Requests using Fetch API with Custom HTTP Library
This tutorial covers the basics of using the Fetch API to perform GET and POST requests within a custom HTTP library. Wiasynchronous operations and handling JSON data, you can effectively fetch data from remote APIs and submit data to servers. This approach gives you greater control and flexibility in managing HTTP requests and responses in your we
3 min read
How to Send Email using 'git send-email' via Gmail?
Email communication is a crucial aspect of collaborative software development. Whether you're sharing patches, discussing issues, or coordinating with your team, knowing how to send emails directly from your Git repository can be highly efficient. In this article, we will guide you through the process of configuring and using git send-email with Gm
3 min read
How to resolve Postman unable to send request body to express application error ?
Encountering difficulties when attempting to send a request body from Postman to your Express application can be a frustrating experience. This issue may manifest in various ways, such as empty request bodies or unexpected behavior on the server side. In this troubleshooting guide, we will explore different approaches to resolve this problem and en
4 min read
How HTTP POST requests work in Node ?
The HTTP POST method is employed by the World Wide Web to send data to a server. This request method is characterized by the inclusion of data in the request body, and the type of this body is specified by the Content-Type header. Express.js, a web application framework for Node, facilitates the creation of servers and handling various HTTP request
2 min read
Difference between PUT and POST HTTP Request in Express and Postman
Both PUT and POST are request methods used in the HTTP protocol. In this article, we will introduce the HTTP methods such as PUT and POST in detail, and we will also discuss in detail when to use PUT and when to use POST. Table of Content PUT methodPOST MethodDifference between PUT and POST methodConclusionPUT methodPUT is one of the HTTP request m
6 min read
Pre-request and Post-request scripts in Postman
Postman is a powerful tool for testing APIs, and its pre-request and post-request scripts allow you to customize requests and responses. it is an API(utility programming interface) development device that enables construction, taking a look at and altering APIs. It could make numerous varieties of HTTP requests(GET, POST, PUT, PATCH), store environ
4 min read
How to send a POST Request with PHP ?
In web development, sending POST requests is a common practice for interacting with servers and exchanging data. PHP, a versatile server-side scripting language, provides various approaches to accomplish this task. This article will explore different methods to send POST requests using PHP. Table of Content Using file_get_contents() and stream_cont
3 min read
How to Send an HTTP POST Request in JS?
We are going to send an API HTTP POST request in JavaScript using fetch API. The FetchAPI is a built-in method that takes in one compulsory parameter: the endpoint (API URL). While the other parameters may not be necessary when making a GET request, they are very useful for the POST HTTP request. The second parameter is used to define the body (dat
2 min read
How To Send POST Request To External API In NextJS?
Sending POST requests to external APIs in Next.js enables interaction with third-party services or your backend. This allows for data submission, form handling, and integration, enhancing your application's functionality. Prerequisites:NextJSJavaScriptReactJSBelow are the approaches mentioned to send POST Request to External APIs in NextJS Table of
4 min read
How to send button value to PHP backend via POST using ajax ?
The purpose of this article is to send the value of the button to PHP back-end using AJAX in an HTML document. Approach: Create a button in HTML document and assign an Id to it. In JavaScript file add an event listener to button i.e click. Then the request is made to PHP file using jQuery Ajax. HTML code: [GFGTABS] HTML <!-- HTML Code -->
2 min read
How to test POST Method of Express with Postman?
The POST method is a crucial aspect of web development, allowing clients to send data to the server for processing. In the context of Express, a popular web framework for Node, using the POST method involves setting up routes to handle incoming data. In this article, we'll explore how to test the POST method of Express with Postman. Prerequisites:B
2 min read
How to Replicate Postman POST API Request using AJAX ?
In this project we'll mimic the action of submitting data using POST to a server from a web page. We replicate this process using AJAX (Asynchronous JavaScript and XML) directly in a web page, we're embedding similar functionality within our own interface. This involves setting up HTML elements like input fields and buttons to gather user input, us
4 min read
How to execute post-request scripts in Postman?
Postman is an API(application programming interface) development tool that helps to build, test and modify APIs. It can make various types of HTTP requests(GET, POST, PUT, PATCH), save environments for later use, and convert the API to code for various languages(like JavaScript, and Python). In this article, we will learn How do you execute post-re
2 min read
Create and use mock servers for API testing or development in Postman
Postman, a comprehensive API platform, includes a robust API client for exploring, testing and defining requests. Its notable feature is the ability to create mock servers, simulating API responses for testing and development purposes. Developers can organize requests in collections, generate mock servers, and customize settings to mimic desired AP
4 min read