Manage your API changes using version control

GitHub Enterprise Server, GitLab Self-Managed, and Azure DevOps Server (hosted on-premises) integrations are available on Postman Enterprise plans with the API Builder add-on.

Postman enables you to use Git-based version control for developing and managing changes to your API. You can connect your API to a remote GitHub, Bitbucket, GitLab, or Azure DevOps repository. The remote repository can be hosted in the cloud or on-premises.

Once your API is connected to a repository, you can switch branches, pull changes from the repository, and push changes to the repository, all from within Postman. When you're ready to share your changes with consumers, you can publish a version of your API to the Private API Network.

API version control with Git is different than using version control for collections in Postman. Learn more about using version control for collections.

API version control workflow

Here's a typical workflow for API-first development with a connected repository:

  1. Create an API in Postman.

  2. Connect the API to a remote Git repository.

  3. In Postman, select an active branch. Make changes to the API definition and associated collections, then commit and push the changes to the remote repository.

    You can also make changes in the Git repository using other tools or editors. For example, developers can follow a Git workflow by working on feature branches, then creating pull requests to merge them into the default branch.

  4. Periodically pull from the remote repository to bring changes others have made into Postman, and resolve conflicts if there are any issues.

  5. In Postman, publish a new version to make the changes available to your API's consumers.

Connecting to a remote Git repository

You can connect your API to a GitHub, Bitbucket, GitLab, or Azure DevOps repository. Once connected, you can sync your API definition and associated collections in Postman with the remote repository.

Managing changes using Git

After you've connected your API to a remote repository, you can perform common Git actions from within Postman. You can work on multiple branches, and Postman tracks the changes you make to your API definition and associated collections. At any time you can push your changes to the repository or pull changes into Postman.

Learn more about managing changes using Git.

Publishing an API version

When you're ready to share the latest changes to your API with consumers, you can publish a version. Publishing a version creates a static representation of your API that consumers can view on the Private API Network.

Learn more about publishing an API version.

Last modified: 2023/06/15