Back up your Postman collections to GitHub, a cloud-based hosting service for Git repositories, with the Postman to GitHub integration. You can also back up collections to a custom domain on GitHub Enterprise Server.
Setting up a GitHub integration requires you to generate a GitHub personal access token and configure how you would like to back up your collections.
To import data into Postman from a GitHub repository, see Importing from GitHub repositories.
With Postman v10 and later, you can connect a GitHub repository to an API in the API Builder. Once connected, you can sync your API's definition and associated collections between Postman and GitHub. You can switch branches, pull changes from the repository, and push changes to the repository, all from within Postman. To learn more about syncing your API with GitHub, see API version control overview.
The legacy GitHub Sync API schema integration is no longer available. You can't create new integrations using this legacy integration, and any legacy integrations you created have been removed. Instead, you can connect your API to a Git repository to sync your API's definition between Postman and GitHub.
To integrate with GitHub, you need a GitHub personal access token.
Sign in to GitHub.
If you don't already have a personal access token, generate a new one. You can use a classic token or a fine-grained token.
repo
and user
scopes.Contents (Read and write)
and Metadata (Read-only)
.Save the generated token to use later.
For more information about generating a token, see the GitHub documentation.
You can back up a Postman Collection to a GitHub repository. After you create the integration, any new changes to the collection in Postman will also appear in the GitHub repository.
From the Home page select Integrations.
Search and select GitHub.
Next to Backup a collection, select Add Integration.
Enter your GitHub Personal Access Token and select Authenticate and Proceed.
After Postman verifies the token, you can configure the integration:
Postman collections
directory.To finish setting up the integration, select Add Integration.
Postman often checks your collection for changes. If Postman identifies changes when it checks your collection, the changes automatically commit to your repository in JSON format. Go to your GitHub repository to view your collections.
You can view your configured integrations on the Browse Integrations page. You can also view integrations that have been configured for a collection by opening the collection and selecting the information icon in the right sidebar. Learn more about viewing or editing integrations.
You can back up a Postman Collection to a GitHub Enterprise Server repository on a custom domain. Follow the same step as backing up collections to GitHub with the following differences.
After searching for the GitHub integration in Postman, select Add Integration next to Backup a collection (custom domain).
Along with your personal access token, enter the custom domain of your enterprise server (for example, https://my-git-server.example.com
). Then select Authenticate and Proceed.
Configure the integration with your collection, repository, directory, file name, and branch.
To finish setting up the integration, select Add Integration.
Postman often checks your collection for changes. If Postman identifies changes when it checks your collection, the changes automatically commit to your repository in JSON format. Go to your GitHub repository to view your collections.
If your network is behind a firewall, you must allowlist a static IP address to enable collection backups to GitHub Enterprise Server on a custom domain.
Contact your IT team to allowlist the following static IP in your firewall:
3.212.102.200
Once you allowlist this IP address, the collection backup integration will be able to connect to your private network.
The Backup a collection (custom domain) integration requires the ability to reach the static IP address
3.212.102.200
from the network where your GitHub Enterprise Server instance is hosted. If your server instance is in a virtual private cloud (VPC), you may need to change the VPC's network access control list or rules.
If your GitHub integration has issues or your data isn't pushed to GitHub, make sure you've met the following requirements:
You added the GitHub integration in the same workspace as the content you want to push to the GitHub repository.
You selected the correct GitHub integration in Postman. For example, if you use GitHub Enterprise Server on a custom domain, make sure you selected the Backup a collection (custom domain) integration.
You initialized your GitHub repository with a README.md
file. When creating a new repository, you can select the Add a README file checkbox.
You selected the correct permissions when creating your GitHub personal access token:
repo
and user
scopes.Contents (Read and write)
and Metadata (Read-only)
.The branch you specified when setting up the integration already exists on GitHub. Postman won't create the branch if it doesn't already exist.
You have permissions to push to the branch.
If your instance of GitHub Enterprise Server is on-premises or self-hosted, check with your IT team for firewall requirements.
Edit the integration to make any required changes. If the integration still doesn't work after you edit it, delete the integration and add it again.
Last modified: 2024/07/26
Additional resources
Blog posts
Case Studies