Postman quickstart

A Postman collection contains ready-to-use HTTP requests with example payloads and responses that developers can immediately test and explore in Postman. Each API definition generates one complete collection with all endpoints organized into folders.

Generate a Postman collection by following the instructions on this page.

This page assumes that you have an initialized fern folder on your local machine. See Set up the fern folder.

1

Pass fern check

Run fern check to ensure that your API definition is valid. If there are any errors, fix them before proceeding.

If you’re using an OpenAPI Specification, check out all of our supported extensions.

2

Add the Postman generator

Run the following command to add the Postman generator to generators.yml:

1fern add fern-postman --group postman

postman is the name of the generators.yml group that configures your Postman collection’s output location and other metadata. You can customize this group name to differentiate between multiple collections if you have multiple APIs in your organization.

This command adds the following group to generators.yml:

generators.yml
1groups:
2 postman:
3 generators:
4 - name: fernapi/fern-postman
5 version: 0.0.45
6 output:
7 location: local-file-system
8 path: ../postman
3

Generate the collection

Run the following command:

1fern generate --group postman

If you have multiple APIs, use the --api flag to specify the API you want to generate:

$fern generate --group postman --api your-api-name

This creates a Postman collection on Fern’s cloud. Once complete, you’ll see a collection.json:

$fern/
> ├─ fern.config.json
> ├─ generators.yml
>postman
> ├─ collection.json