Create and manage collections from the Postman VS Code extension

With the Postman VS Code extension, you can create new collections to group HTTP requests.

To learn more about using collections in Postman, see Create and manage request collections in Postman.

Add HTTP requests to a collection

To create a collection and add an HTTP request to it, do the following:

  1. Select a workspace from the workspace dropdown menu in the sidebar.
  2. Click Collection icon Collections.
  3. Click Add icon.
  4. To add an HTTP request to a collection, click Options icon next to a collection, then select Add Request.

You can also use the Postman: Create a new Postman Collection command from the Command Palette to create a collection.

Manage a collection

To customize and configure a collection with HTTP requests, do the following:

  1. Select a workspace from the workspace dropdown menu in the sidebar.
  2. Click Collection icon Collections.
  3. Select a collection.
  4. Click Authorization to configure authorization details for your collection.
  5. Select Scripts > Pre-request to define a pre-request script for your collection, which will run before requests are sent to the server.
  6. Select Scripts > Post-response to define a post-response script for your collection and the requests and folders in it, which will run after a response is received. Learn more about adding post-response scripts.
  7. Click Variables to define values for collection variables to share across all requests in the collection.

You can move an existing folder or request to a new collection. In the sidebar, select the folder or request you want to move, then drag it to a new collection

You can also save a copy of a request to a new collection. Select a request in the sidebar, select Down Large icon > Save As at the top, then choose or create a collection to save it in.

Last modified: 2025/07/25