Generating an API specification from a collection is available with Postman Enterprise plans.
You can generate an OpenAPI 3.0 specification from a collection. The generated specification is created in Spec Hub. You can use a generated specification to integrate your API with downstream systems, such as API gateways or security scanners, to complete the API lifecycle. You can also keep the specification in sync with its collection.
Before generating a specification, Postman recommends that you turn on types in the collection. Then add properties to parameters and headers and body data that describe your APIs. This way Postman can generate a complete OpenAPI 3.0 specification in Spec Hub. Learn more about types in collections.
You can generate an OpenAPI 3.0 specification from your collection. Postman automatically creates a specification with paths, components, and more based on your collection. The specification will also have properties associated with parameters, headers, and body data if types is turned on.
To generate a specification from a collection, do the following:
Select Collections in the sidebar.
Select View more actions next to a collection, then select More > Generate Specification.
If types isn't turned on for the collection, Postman recommends selecting Try adding types to turn on types. Then add properties to parameters, headers, and body data to generate a complete OpenAPI 3.0 specification.
Enter a name for the specification.
Select YAML or JSON as the file format in the generated specification.
Select Generate Specification.
To view the generated specification, open the collection's overview, and then select the specification's name under Specification. You can also select Specs in the sidebar and select the specification.
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.
When you generate an OpenAPI 3.0 specification from a collection, Postman creates a specification that matches the requests in the collection. If you update the collection, such as creating a new request, Postman alerts you that the generated specification isn't in sync with the collection.
To update a generated specification, do the following:
Select Collections in the sidebar and select a collection.
An orange dot next to Specification in the collection's overview indicates the specification isn't in sync with the collection.
Select Specification.
Select Update to update the specification.
Last modified: 2025/04/01