Set up Native Git
You can start using local mode right away by connecting to a local project folder. When you’re ready to sync your changes with Postman Cloud, you can link the folder to Git and enable push and pull. For an end-to-end workflow that includes creating a workspace, generating API artifacts, and syncing resources, see Sync local and cloud elements with Native Git.
After you connect your repo, review the Issues tab for schema, path, and file-format problems before syncing changes to the cloud.
If you’re using a coding agent to set this up instead of the app, run postman init from the terminal. It creates the same project structure without the app and installs agent skills so the agent can work with Postman the way a developer would.
Follow these recommendations to set up your workspace to ensure access to both the collection and the underlying implementation code. The Postman Agent’s capabilities, such as AI-assisted debugging and test generation, are more efficient with this setup.
Repos with a single service
For repos with a single service, connect your Postman workspace to a root folder that contains both your API collections and your application code.
Monorepos with multiple services
In a monorepo, each service is an independently deployable application or API that lives in its own folder within the repository, with its own Postman elements, such as collections and environments.
For monorepos containing multiple services, don’t connect your Postman workspace to the repository root. Instead, create a workspace for each service and connect it to that service’s folder within the repository, for example services/service_1. Postman creates the .postman/resources.yaml manifest and the postman directory inside the service folder, so the workspace only picks up that service’s collections, environments, and specifications. Connecting to the repository root would sync every service’s files into a single workspace, which mixes unrelated elements together and makes it harder to scope access to each service’s team. To learn how the manifest controls what’s created, updated, or deleted in the cloud, see How the resources.yaml manifest controls sync.
To connect a service folder, follow the steps in Connect your Git project to your workspace. When you choose the folder, select the service’s subfolder inside the repository, such as multiservice-monorepo/services/service_1, rather than the repository root.
Multiple workspaces can connect to the same repository, each to its own subfolder. For example, a development team and a QA team can each connect their workspace to a different subfolder, then collaborate on the same pull request while keeping their Postman elements scoped to their own folder.
Example: Workspace folder in a monorepo
When you use the Postman CLI, pass the service folder as the path when you connect, for example postman workspace connect-git <workspace-id> services/service_1. To learn more, see postman workspace connect-git. Then run postman workspace push from the service folder, not the repository root, so the command reads that service’s .postman/resources.yaml manifest and syncs only that service’s elements.
Connect an existing service to Native Git
To bring a service with existing Postman elements into Native Git, ensure you have editor access to the workspace that contains the service’s collection and environments. Then do the following:
- Check out your team’s integration branch, such as
mainordevelop. - Connect your project workspace to the repo. For a single-service repo, connect the repository root. For a monorepo, connect the service’s folder within the repo. Validate this step by ensuring
.postman/resources.yamlappears in the folder you connected. This file maps your local files to specific Postman Cloud entities. - Pull the collection and environments into your file system. When you choose which workspace to pull from, select the workspace that already has the service’s elements — you don’t need to move them into the newly connected workspace first.
If the service doesn’t have existing Postman elements yet, skip the pull step and generate API artifacts with Postman AI instead.
Keep local environment values in the Postman app, and commit only Shared values to Git. Integrate a Postman Vault to reference managed secrets instead of committing them to your repository.
Connect your Git project to your workspace
For the folder connection steps, Git setup, and an explanation of the files Postman creates, see Connect a folder and set up Git. For monorepos, connect the service folder rather than the repository root.
Identify issues in local collection files
The Issues tab surfaces problems Postman finds in your local collection files. It shows a total error and warning count, then lists the affected files grouped by resource type, along with a description of what’s wrong with each one.
Flagged issues are generally file-format problems, such as an unknown request kind or an invalid value for a field like an auth or body type.
Schema validation
File and path rules
Style and redundancy warnings
Fix issues with AI
Instead of fixing each flagged issue by hand, use Postman AI to fix them.
Open the Issues panel
Open the Issues tab, next to Console and Terminal. Hover an issue to show a per-issue Fix button, or select Fix Issues in the panel header to fix every issue at once.
Review the proposed edits
Postman AI opens with a prompt to fix the lint issues in the workspace. It reads each affected file, groups the fixes into a to-do list, and proposes edits one at a time as a diff with Apply Edit and Reject buttons.
How the resources.yaml manifest controls sync
The .postman/resources.yaml file configures how a repository syncs to the cloud. Postman creates it when you connect a folder to a workspace, and the push command reads it from your working directory. It has three main parts:
push finds your local elements two ways and combines the results: it scans the default postman/ directories, and it reads the paths listed in localResources. An element found both ways is synced only once.
Paths in localResources are relative to the .postman/ directory and must match the on-disk folder names, which are also the element names in the cloud.
For each element it finds, push uses cloudResources to decide whether to create or update it:
- If the element has a matching
cloudResourcesentry,pushupdates the existing cloud element. - If it has no
cloudResourcesentry,pushcreates a new cloud element. After a successful create,pushrecords the returned ID incloudResourcesso later pushes update it instead of relying on name matching.
Use --push-strategy force-sync when you want your local files to be the complete source of truth and the cloud workspace to be an exact mirror of them — for example, after renaming or deleting elements locally. With this flag, push mirrors the cloud to everything it finds locally, from both the scan and localResources, and deletes a cloud element only when that element is absent from both.
View your project workspaces in Postman
Your Git-connected project workspaces appear in the workspaces dashboard.
To view all project workspaces in the workspaces dashboard, do the following:
- Click Workspaces in the Postman header, and then click View all workspaces.
- Select the Project Workspaces tab.