The API Builder provides one place to view, create, and manage all of your API's documentation. Postman automatically generates API docs for any OpenAPI 2.0 or 3.0 definition. You can also add detailed documentation to any API by generating a collection from the API or by adding a copy of an existing collection.
If you are designing an API based on the OpenAPI 2.0 or 3.0 specification, Postman automatically creates documentation based on your API definition.
The API documentation includes complete API, path, and operation information, such as authentication methods, parameters, request bodies, response bodies and headers, and examples. The documentation also includes information for various data models, such as required attributes, default, minimum, and maximum values, and other constraints.
To view the documentation for an OpenAPI 2.0 or 3.0 API, do the following:
You can also view schema documentation while editing your OpenAPI 2.0 or 3.0 definition. Postman displays a live preview of the documentation as you work on your API. Learn more about previewing schema documentation.
To generate a new collection for API documentation, do the following:
The new collection displays on your API's overview and under your API in the sidebar. To view documentation for the collection, select the collection and select View complete documentation.
To use an existing collection for API documentation, do the following:
The copy of the collection displays on your API's overview and under your API in the sidebar. To view documentation for the collection, select the collection and select View complete documentation.
When you add a collection, an independent copy of the collection is added to the API. The copy in the API will no longer be in sync with the original. If you move or delete an API, any collections contained in the API are moved or deleted with it.
You can add to your API documentation collections from the API Builder.
To edit a documentation collection for an API, do the following:
Schema documentation can't be edited directly. Instead, edit your API's definition and then select Save. Postman automatically updates the API docs to reflect the latest changes to your definition.
To delete a documentation collection from an API, do the following:
After adding documentation to an API in Postman, you can edit and format the docs. You can also publish your API, including the documentation.
See how to document an API with a collection template that's a boilerplate for documentation that you can customize and reuse. To try out this template, select API documentation.