For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Postman
PricingEnterprise
Contact SalesSign InSign Up for Free
HomeDocs
HomeDocs
      • Overview
        • Overview
        • Install and sign in
        • Send requests
        • Add and manage certificates
        • Create and manage collections
        • Create and manage environments
        • Share your work and manage access
        • Document APIs
          • Overview
          • Write scripts
          • Use packages in scripts
          • Run collections
        • Manage Postman with AI agents
        • Feedback
Postman API Platform

Product

  • Postman Overview
  • Enterprise
  • Spec Hub
  • Flows
  • Agent Mode
  • API Catalog
  • Fern
  • Postman CLI
  • Integrations
  • Workspaces
  • Plans and pricing

API Network

  • App Security
  • Artificial Intelligence
  • Communication
  • Data Analytics
  • Database
  • Developer Productivity
  • DevOps
  • Ecommerce
  • eSignature
  • Financial Services
  • Payments
  • Travel

Resources

  • Postman Docs
  • Academy
  • Community
  • Templates
  • Intergalactic
  • Videos
  • MCP Servers

Legal and Security

  • Legal Terms Hub
  • Terms of Service
  • Postman Product Terms
  • Security
  • Website Terms of Use

Company

  • About
  • Careers and culture
  • Contact us
  • Partner program
  • Customer stories
  • Student programs
  • Press and media
Twitter iconLinkedIn iconGithub iconYouTube iconInstagram iconDiscord icon
Download Postman
Privacy Policy

© 2026 Postman, Inc.

On this page
  • Reuse scripts with the package library
  • Import packages from external registries
ReferencePostman VS Code extensionTest APIs

Reuse packages from the Postman VS Code extension

||View as Markdown|
Was this page helpful?
Previous

Test APIs using the Postman VS Code extension

Next

Use the Collection Runner from the Postman VS Code extension

Built with

With the Postman VS Code extension, you can import packages from your team’s Postman Package Library into scripts in your internal workspaces. You can also import packages from external packages registries, such and npm or JSR, into your scripts.

Reuse scripts with the package library

You can use the package library to store commonly used scripts and tests as packages in your Postman team. You can maintain scripts and tests in one location and reuse them in your internal workspaces. Your Postman teammates can also access and import packages from the package library. The package library supports JavaScript code.

To create a new package, do the following:

  1. Click Library in the footer, then choose Package icon Packages.

  2. Click Add icon New Package.

  3. Enter the following:

    • Name - The name of the package. This is used in the import statement that adds the package to your scripts.

      You can’t use the name of a package that already exists or a package that was deleted. Also, you can’t change the name of a package later.

    • Summary - A short summary about the package and what it does.

    • Code - Enter code in the package. Learn how to write code in a package.

  4. Click Create.

Once you’ve created a package, you can write code in it and import the package into your pre-request and post-response scripts.

To learn more about using your team’s package library, see Add internal scripts to the Package Library in Postman.

Import packages from external registries

You can import public packages from external package registries into your scripts. Postman supports importing packages from npm and JSR registries in scripts. External packages are supported in HTTP requests in the VS Code extension. Private packages aren’t supported in the VS Code extension.

To search and import an external package, do the following:

  1. Open an HTTP collection, folder, or request. You can also open a gRPC or GraphQL request.
  2. Select the Scripts tab.
  3. Select Package icon Packages at the lower right of the code editor, and select Open package library.
  4. Search for a package in npm or JSR. To filter your search results by package registry, select NPM, JSR, or both. Search returns the top five results for each package registry.
  5. Select a package to import it into the code editor.

To learn more about importing packages from external registries, see Import packages from external registries in Postman.