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
        • Add types to parameters and headers
        • Add types to body data
        • View types and documentation
        • Generate API specifications
      • Sync collections and specifications reference
      • Migrate from API Builder to Spec Hub
      • Develop APIs with the API Builder
      • Simulate real-world conditions
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
  • Generate OpenAPI specifications from a collection
  • Keep OpenAPI specifications in sync with a collection
  • Configure sync settings
Design and build APIsDesign APIs with collections

Generate an API specification from your collection

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

View types and documentation for an API collection

Next

Design API specifications in Postman

Built with

You can generate an OpenAPI 2.0, 3.0, and 3.1 specification from a collection in Spec Hub. Generated specifications enable you to complete the API lifecycle by integrating your API with downstream systems, such as API gateways or security scanners. You can also keep the specification in sync with its collection.

Add types to parameters and headers and body data that describe your APIs. This way Postman can generate a complete OpenAPI specification in Spec Hub. Learn more about types in collections.

To learn more about generating and syncing specifications, see Sync collections and specifications reference.

Generate OpenAPI specifications from a collection

You can generate an OpenAPI specification from your collection. Postman automatically creates a specification with paths, components, and more based on your collection. The specification will also have types associated with parameters, headers, and body data if types are defined in the collection.

To generate a specification from a collection, do the following:

  1. Expand Collections in the sidebar.
  2. Click Options icon View more actions next to a collection, then select More > Generate specification.
  3. Enter a name for the specification.
  4. Select YAML or JSON as the file format in the generated specification.
  5. Click Generate Specification.

To view the generated specification, open the collection’s overview, and then click the specification’s name under Specification. You can also expand Specs in the sidebar and select the specification.

Generated specification in collection overview

Your Postman plan gives you a limited number of specifications in your team’s internal workspaces. Learn more about resource usage in Postman.

You can only generate one API specification from the same collection. To generate a new specification from the collection, delete the generated specification from Spec Hub.

Keep OpenAPI specifications in sync with a collection

Syncing isn’t available for collections generated from AsyncAPI specifications.

When you generate an OpenAPI specification from a collection, Postman creates a specification that matches the requests in the collection. If you update the collection or specification, such as by adding a new request, Postman alerts you that the generated specification isn’t in sync with the collection.

Postman doesn’t delete elements from a collection when you sync it with the specification. For example, if you change the name of an existing path in your specification, Postman creates a new path in your collection when it’s updated. The existing path still exists with the previous name in your generated collection, and you can choose to delete the path.

Sync changes to a specification

Syncing collections to multi-file OpenAPI specifications isn’t supported.

To sync changes made in a generated collection to your OpenAPI specification, do the following:

  1. Expand Collections in the sidebar, then select the collection you want to sync.
  2. In the collection’s Overview tab, click Update icon Sync specification.

Sync collection with specification

Changes to vendor extensions, operations, and requests made directly to the specification won’t be overwritten by the collection.

Sync changes to a collection

To sync changes made in an OpenAPI specification to a generated collection, do the following:

  1. Expand Specs in the sidebar and select an OpenAPI specification.
  2. Click Warning icon Update Collection.
  3. Click Update next to the generated collection.

Configure sync settings

You can configure settings that enable you to customize the syncing behavior between collections and OpenAPI specifications.

To configure sync settings from a collection, do the following:

  1. Expand Collections in the sidebar, then select the collection you want to sync.
  2. In the collection’s Overview tab, click Setting icon Configure update settings.
  3. Configure sync settings between the collection and specification.
  4. Click Save.
Tip

You can also configure sync settings from an OpenAPI specification.

Sync settings

You can configure the following sync settings between collections and OpenAPI specifications:

  • Sync example values between Spec and Collection — Turn this on to keep examples in the specification and values in the collection in sync.