Publishing to Postman
Publish your Postman collection directly to Postman workspaces, making it easy for your team and API consumers to discover and test your endpoints.

This page assumes that you have:
- An initialized
fern
folder. See Set up thefern
folder. - A GitHub repository for your Postman collection. See Project structure.
- A Postman generator group in
generators.yml
. See Postman Quickstart.
Generate an API key
Configure Postman publication
You’ll need to update your generators.yml
file to configure the output location, repository, publishing mode, and authentication credentials for Postman publishing. Your generators.yml
should live in your source repository (or on your local machine), not the repository that contains your Postman collection file.
Configure output
location
In the group
for your Postman collection, change the output location from local-file-system
(the default) to postman
to indicate that Fern should publish your collection directly to Postman:
Add repository location
Add the path to the GitHub repository containing your Postman collection:
Choose your publishing mode
Optionally set the mode to control how Fern handles Postman publishing:
mode: release
(default): Fern generates code, commits to main, and tags a release automaticallymode: pull-request
: Fern generates code and creates a PR for you to review before releasemode: push
: Fern generates code and pushes to a branch you specify for you to review before release
You can also configure other settings, like the reviewers or license. Refer to the full github
(generators.yml
) reference for more information.
Choose your versioning approach
Fern’s Postman publishing uses a simple versioning approach based on whether you specify a collection-id
:
- Update existing collection: Specify
collection-id
. Fern updates the same collection each time. Use this option to keep your workspace clean with one collection that is always current. - Create new collections: Omit
collection-id
. Fern creates a new collection with each publish. Use this option to maintain historical versions or separate environment collections.
Publish as a new collection
Specify the workspace ID
You can get your workspace ID by navigating to your workspace and either:
- Copying the ID from the URL:
https://user-name.postman.co/workspace/workspace-name~WORKSPACE-ID/request/create
- Making a GET request to
https://api.getpostman.com/workspaces
. You must also enter your API key in the Auth tab. This request returns configuration, including IDs, for all of your workspaces.

Publish to an existing collection
To publish to a existing collection, specify the workspace ID, existing collection ID, and name of the existing collection.
Specify the workspace ID
You can get your workspace ID by navigating to your workspace and either:
- Copying the ID from the URL:
https://user-name.postman.co/workspace/workspace-name~WORKSPACE-ID/request/create
- Making a GET request to
https://api.getpostman.com/workspaces
. You must also enter your API key in the Auth tab. This request returns configuration, including IDs, for all of your workspaces.

Specify the collection name and ID
You can get your collection name and ID by navigating to your workspace and either:
- Copying the ID from the URL:
https://user-name.postman.co/workspace/workspace-name~workspace-id/collection/COLLECTION-ID
- Making a GET request to
https://api.getpostman.com/collections
. You must also enter your API key in the Auth tab. Send the request. This request returns configuration, including IDs and names, for all of your collections.
Publish your collection
Decide how you want to publish your collection to Postman. You can use GitHub workflows for automated releases or publish directly via the CLI.
Release via a GitHub workflow
Set up a release workflow via GitHub Actions so you can trigger new Postman collection releases directly from your source repository.
Set up authentication
Open your source repository in GitHub. Click on the Settings tab. Then, under the Security section, open Secrets and variables > Actions.
You can also use the url https://github.com/<your-repo>/settings/secrets/actions
.
Add secret for your API key
- Select New repository secret.
- Name your secret
POSTMAN_API_KEY
. - Add the corresponding API key you generated above.
- Click Add secret.
Add secret for your Fern Token
- Select New repository secret.
- Name your secret
FERN_TOKEN
. - Add your Fern token. If you don’t already have one, generate one by
running
fern token
. By default, thefern_token
is generated for the organization listed infern.config.json
. - Click Add secret.
Set up a new workflow
Set up a CI workflow that you can manually trigger from the GitHub UI. In your repository, navigate to Actions. Select New workflow, then Set up workflow yourself. Add a workflow that’s similar to this:
You can alternatively configure your workflow to execute on: [push]
. See Vapi’s npm publishing GitHub Action for an example.
Regenerate and release your collection
Navigate to the Actions tab, select the workflow you just created, specify a version number, and click Run workflow. This regenerates your collection.
Specifying the version number will update the release number in your GitHub repository, but won’t version your collection.
The rest of the release process depends on your chosen mode:
-
Release mode (default): If you didn’t specify a
mode
or setmode: release
, no further action is required. Fern initiates the publishing workflow in your collection repository. -
Pull request or push mode: If you set
mode: pull-request
ormode: push
, Fern creates a pull request or pushes to a branch respectively. Review and merge the PR (pull-request
) or branch (push
), then tag a new release to initiate the publishing
Once the workflow completes, you can view your new or updated collection by logging into Postman and navigating to your workspace.

Release via CLI and environment variables
Regenerate and release your collection
Regenerate your collection.
The --version
parameter in fern generate --version X.X.X
creates a GitHub release tag but doesn’t affect Postman collection naming or versioning. Collection versioning is controlled by the collection-id
configuration.
The rest of the release process depends on your chosen mode:
-
Release mode (default): If you didn’t specify a
mode
or setmode: release
, no further action is required. Fern initiates the publishing workflow in your collection repository. -
Pull request or push mode: If you set
mode: pull-request
ormode: push
, Fern creates a pull request or pushes to a branch respectively. Review and merge the PR (pull-request
) or branch (push
), then tag a new release to initiate the publishing
Once the workflow completes, you can view your new or updated collection by logging into Postman and navigating to your workspace.
