The Postman VS Code extension
This extension is currently in its beta phase. We appreciate your feedback and patience as we fine-tune its capabilities.
The Postman VS Code extension enables you to develop and test your APIs in Postman directly from Visual Studio Code.

Sign in to Postman
The Postman VS Code extension is available on Free, Basic, and Professional plans.
Sign in to Postman, and select a team to access workspaces in the team. When you select a workspace, you'll be able to see the request history for that workspace in the sidebar. You must sign in to Postman to use the VS Code extension.
- Open the VS Code extension.
- Select Sign In in the sidebar. The VS Code extension will open a new screen that directs you to sign in from your browser.
- In your browser, select a Postman team then sign in to Postman. After you sign in, you can close the browser tab and return to the VS Code extension.
To learn more about signing in to Postman, see Postman's documentation.
If you don't have a Postman account, create an account to sign in to use the VS Code extension:
- Open the VS Code extension.
- Select Create Account in the sidebar. The VS Code extension will open a new screen that directs you to create an account from your browser.
- In your browser, enter your information then select Create free account.
To learn more about signing up for Postman, see Postman's documentation.
Send API requests
You can use the VS Code extension to create and send HTTP, raw WebSocket, and gRPC requests.
Send HTTP API requests
You can create and send HTTP requests.

Select a workspace from the workspace dropdown menu in the sidebar.
You can also create a new workspace from the VS Code extension.
Select the request dropdown menu in the sidebar, then select HTTP to use Postman's REST client.
If you previously selected HTTP from the request dropdown menu, you can create another HTTP request by selecting New HTTP Request in the sidebar.
Specify the details you need for your request.
Select Send.
Requests sent in the VS Code extension appear in your workspace's request history in both the VS Code extension and the Postman app.
To learn more about creating and sending HTTP requests, see Postman's documentation.
You can also use the Postman: Create a new HTTP Request
command from the Command Palette to send a request.
Send multiprotocol API requests
You can create and send raw WebSocket and gRPC requests.
- When you create a request, select the request dropdown menu first, and select WebSocket or gRPC instead of HTTP.

For Postman's WebSocket client:
- Enter the WebSocket server URL. A WebSocket URL begins with
ws://
or wss://
.
- Select Connect.
- To disconnect your WebSocket request's connection, select Disconnect.

For Postman's gRPC client:
- Enter a URL into Server URL.
- Select the Method selection dropdown to select the method you want to invoke.
- Configure a service definition.
- Select Invoke.
To learn more about creating and sending WebSocket requests, see Postman's documentation.
To learn more about creating and sending gRPC requests, see Postman's documentation.
Send API requests from your history
You can send requests previously sent in a workspace using the VS Code extension and the Postman app.

- Select a workspace from the workspace dropdown menu in the sidebar.
- Select the History tab.
- Select a request from your history, and edit the request if you'd like.
- Send the request.
Use collections
You can create new collections to group HTTP requests, and you can manage collections with HTTP requests.

To create a collection and add an HTTP request to it, do the following:
- Select a workspace from the workspace dropdown menu in the sidebar.
- Select the Collections tab.
- To create a collection, select the + icon.
- To add an HTTP request to a collection, select the more actions icon to the right of a collection, then select Add Request.
To customize and configure a collection with HTTP requests, do the following:
- Select a workspace from the workspace dropdown menu in the sidebar.
- Select the Collections tab.
- Select a collection.
- Select Authorization to configure authorization details for your collection.
- Select Pre-request Script to define a pre-request script for your collection, which will run before requests are sent to the server.
- Select Tests to define a test script for your collection and the requests and folders in it, which will run after a response is received. Learn more about adding test scripts.
- Select Variables to define values for collection variables to share across all requests in the collection.
To learn more about using collections, see Postman's documentation.
Document collections
Postman automatically generates basic documentation for any collection you create, including details about requests and sample code in various client languages. You can add descriptions to collections, folders, and requests to make more valuable information available to your users. You can write your descriptions using the visual editor or you can enter Markdown syntax.
To add a description to a collection or folder, do the following:
- Select the Collections tab, and then select a collection or folder.
- Enter a description in the Overview tab.
- Select outside of the editor to save your new content.
To add a description to a request, do the following:
- Select the Collections tab, and then select a request.
- Select View Documentation in the top right.
- Enter a description in the right sidebar.
- Select outside of the editor to save your new content.
To learn more about writing documentation, see Postman's documentation.
To view the complete documentation for a collection, do the following:
- Select the Collections tab, and then select a collection.
- In the Overview tab under the Description, select View in Postman. The VS Code extension will direct you to the complete collection documentation in Postman.
Manage environments
You can add a set of variables to an environment that you can use in your requests.

To create an environment and add variables to it, do the following:
- Select a workspace from the workspace dropdown menu in the sidebar.
- Select the Environments tab.
- To create an environment, select the + icon.
- Add variables to the environment.
- Select Save.
To use environment variables in a request, do the following:
- Select the Collections tab.
- Select a request.
- Select an environment from the environment selector in the top-right corner.
To learn more about managing environments, see Postman's documentation.
Use cookies
You can view and edit cookies associated with different domains. You can then use the cookies stored in the cookie jar when sending HTTP requests in Postman.

To manage cookies in the VS Code extension, open an HTTP request, then select Cookies (below Send).
You can also open the cookie editor with the Postman: Open cookies editor
command in the Command Palette.
To learn more about using cookies, see Postman's documentation.
Import with cURL commands
You can use cURL commands to import data and create requests from the data.

Select a workspace from the workspace dropdown menu in the sidebar.
You can also create a new workspace from the VS Code extension.
Select the request dropdown menu in the sidebar, then select Import cURL.
Enter your cURL command into the input field, then press Enter. The VS Code extension opens a request in a new tab.
To cancel entering a cURL command, press Escape.
Test your API
You can use the VS Code extension to test an API's functionality. You can add test scripts to your collection, folders, and requests. You can also run a collection's or folder's requests in a specific sequence.
Test your API using scripts
You can add API test scripts to collections, folders, and requests that run after a response is received. Add tests to confirm that your API is working as expected, and help you debug your API if something goes wrong. Postman supports test scripts written in JavaScript.
To add test scripts to collections, folders, and requests, do the following:
Select a collection, folder, or request you'd like to add tests to.
To learn more about testing collections and folders, see Postman's documentation.
Select the Tests tab, and add your API test scripts. You can add your own test scripts and snippets of commonly-used test code. For test script examples, see Postman's documentation.
Optionally, you can add log statements to your test scripts to help you debug your requests. Logged statements display in the Postman Console.
Select Send to run your request. The tests will execute after a response is received. In the Response section, select the Test Results tab to review the results of your tests.
To learn more about writing tests scripts and using snippets of commonly-used test code, see Postman's documentation.
Test your API using the Collection Runner
You can use the Collection Runner to manually run a collection's or folder's requests in a specific sequence, enabling you to test an API's functionality or performance. You can also automate collection runs in your CI/CD with the Postman CLI or Newman.
By default, your requests run in the sequence they're listed in the collection. If you need to change the order of execution, select and drag a request to its new location in the sequence. You can also remove an individual request from the run by clearing the checkbox next to its name. You can optionally use API test scripts to pass data between requests and alter the request workflow. Learn how to customize a collection run with test scripts.
To manually run requests in a collection or folder, do the following:
Select a collection or folder with requests you want to run in sequence.
Select Run to configure the collection run.
If you want your collection to run with an environment, select it using the environment selector at the top right. You can also select Create New to create a new environment. Learn how to manage environments in the VS Code extension.
Choose any configuration options:
Iterations - The number of iterations for your collection run. You can also run collections multiple times with different data sets to build workflows.
Delay - An interval delay in milliseconds between each request.
Persist responses for a session - Log the response headers and bodies so you can review them after running the collection. For large collections, persisting responses may affect performance.
Request and response details are persisted locally during your current Postman session and aren't saved permanently. Signing out of Postman, signing into another device with the same account, or refreshing your browser will end your session and remove the logged data.
Response and request details are available for the person who started the collection run. Other team members can't view details for collection runs that you start.
Advanced settings
- Stop run if an error occurs - By default, the collection run stops if an exception is encountered within a script or if there's a problem sending a request. Clear this checkbox if you want the collection run to continue after an error occurs.
- Keep variable values - Persist the variables used in the run, so any variables updated by the run will remain changed after it completes. If you don't persist variables, changes aren't saved after the run completes. Note that persisting variables in the collection run will update the current value only.
- Run collection without using stored cookies - If your requests use cookies, you can optionally deactivate them for a collection run.
- Save cookies after collection run - Save the cookies used in this session to the cookie manager. Any values changed by requests during the run will remain after it completes.
To run the collection with your completed configuration, select Run (collection name).
Your Postman plan gives you a limited number of collection runs you can use each month. This limit applies to collections you run manually. A collection run with multiple iterations counts as a single run.
When running collections manually, Postman displays the results of your request executions and test results in real time. To learn more about what happened during the collection run, you can:
- Select a request to view more details about it, including the response, headers, and request.
- Select the name of a request to open it in a new tab.
- Select the Passed, Failed, or Skipped tabs to filter the results by test status. To show all requests, select the All Tests tab. If any tests in a request script fail during a collection run, the whole request fails.
- Select View all runs to view the run history for your collection.
- Select Run Again to run the collection again using the same settings.
- Select + New Run to configure a new run for the collection. Make changes to any settings, and then select Run (collection name) to run the collection again.
You can also view the run history for your collection, including collections you ran using the Collection Runner and the Postman CLI. Select a collection or folder, then select the Runs tab. You can filter your run history by the number of collection runs to view, users who ran the collection, the test status of the collection runs, and the source of the collection run. To return to the results of the collection run, hover over a collection run and select the view report icon.
Troubleshoot with the Postman Console
You can use the Postman Console to troubleshoot your requests. You can also use the Console to debug pre-request scripts and tests scripts, logging output to the Console. To open the Postman Console, select the console icon at the top of the sidebar.
Keyboard shortcuts
Action |
macOS |
Windows/Linux |
Open the VS Code extension |
Cmd+Opt+P |
Ctrl+Win+P |
Create a new collection |
Holding Cmd, press R then C |
Holding Ctrl, press R then C |
Create a new environment |
Holding Cmd, press R then E |
Holding Ctrl, press R then E |
Open a new request tab |
Holding Cmd, press R then N |
Holding Ctrl, press R then N |
Open the Postman Console |
Holding Cmd, press R then P |
Holding Ctrl, press R then P |
View the extension log
The VS Code extension log displays events related to the VS Code extension.
- Select the Views and More Actions icon at the top of the sidebar.
- Select Open Extension Log. The VS Code extension log will open in a new tab.
View the version
To view the version of the VS Code extension you're using, do the following:
- Select the Views and More Actions icon at the top of the sidebar.
- Select Version.
Share feedback
You can create a bug or feature request for the VS Code extension.
- Select the Views and More Actions icon at the top of the sidebar.
- Select Report Bug / Share Feedback. The VS Code extension will open a new screen that directs you to GitHub in your browser.
- In your browser, select Get started to create a bug or feature request.
- Enter the bug or feature request details, then select Submit new issue.