Send a request with the Send Request block

You can build a flow that uses any request available to you in Postman, whether it's in your workspace or the Postman API Network.

In this tutorial, you'll create a new flow, collection, and request. Then, you'll use the Send Request block and your new request to send a request to the Postman Echo API.

Create a new flow

You build flows in a workspace. Workspaces let you organize your API projects and collaborate with your team.

To create a new flow, do the following:

  1. Choose an existing workspace or create a new one.
  2. From the Postman sidebar, select Flow icon Flows.
  3. Select Add icon Create a new Flow > Flow icon Create new Flow.
  4. Enter a name. For example, enter Create a request.
  5. Select the Return or Enter key.

Create a new collection

Collections let you organize the requests in your workspace, including those you use to build your flows. To learn more, see Postman Collections.

To create a new collection, do the following:

  1. From the Postman sidebar, select Collection icon Collections.
  2. Select Add icon Create new collection > New collection icon Blank collection.
  3. Enter a name. For example, enter Postman Echo API.
  4. Select the Return or Enter key

Create a new request

With the Postman Echo API, you can skip authentication and any other configuration steps and send an API request.

To create a new request, do the following:

  1. Select Add a request.

  2. Enter the name Postman Echo.

  3. Select the Return or Enter key.

  4. Enter the following request URL:

    https://postman-echo.com/get
    
  5. Select Save icon (stroke, large) Save.

Add a Send Request block

The Send Request block lets you use any request available to you in your flow. In this tutorial, you'll use the request you created in the previous steps.

To add a Send Request block, do the following:

  1. From the Postman sidebar, select Flow icon Flows.
  2. Select your new flow.
  3. Select HTTP Request icon Send a request.
  4. Select Select a request and choose the Postman Echo request. If you want to search for the request, enter Postman Echo in search.

Connect an Output block

When you connect two blocks, you connect one block's input to another block's output. Inputs are on the block's left side and outputs are on its right side.

The Display block displays incoming data, such as the Send Request block's outgoing API response.

To connect a Display block, do the following:

  1. Hover over the Send Request block's Success output port. The pointer changes to a crosshair.
  2. Decide where on the canvas you want to place the Output block and drag the port to that location.
  3. Select View icon Output. If you want to search for the block, enter Output in search.

Run the flow

From the canvas toolbar, select Run icon Run.

Send a request flow

Congratulations! You sent a request and displayed the response in a Display block.

Last modified: 2024/08/13