You can add API requests and reference their responses elsewhere in your notebook to create an interactive experience. For example, you can add an input block for your API consumer's email address and use a request block to send them a welcome message.
To add a request block, do the following:
Postman sends the request and returns the response.
You can reference your request block by name. For example, if you name your request block "getUser", you can reference its response in another request block with the syntax {{getUser}}
. Or you can reference it in a code runner block with the syntax $getUser
.
Furthermore, you can use dot notation to reference data within a response. For example, in another request block, you can reference the user's first email with the syntax {{getUser.emails.0}}
. Or in a code runner block, you can reference the same value with the syntax $getUser.emails[0]
.
To reference your request block, do the following:
Open your notebook or create a new one.
Get your request block's name.
Reference your request block:
{{requestBlockName}}
or {{requestBlockName.path.to.data}}
.$requestBlockName
or $requestBlockName.path.to.data
.If you can use the data from one response in the request of another, you can send those requests in sequence. For example, you can get a user's email from a response and use it to send a different request.
To send requests in sequence, do the following:
{{requestBlockName.path.to.data}}
. Then, click Postman uses the first request's response to send the second request. You can add more requests to the sequence.
Last modified: 2025/07/28