*** title: Publish API versions commands approved: 2026-03-18T00:00:00.000Z topictype: reference slug: docs/postman-cli/postman-cli-publish-api-versions max-toc-depth: 2 ---------------- The `postman publish api` command is only supported for API Builder objects in Postman v11. The Postman API Builder isn't supported in Postman v12 and later. Learn about [using the API Builder in Postman v11 and earlier](/v11/docs/design-apis/api-builder/overview/). This topic covers API publishing commands for the [Postman CLI](/docs/postman-cli/postman-cli-overview/). You can publish API versions in the Postman API Builder from the command line with the Postman CLI. Use the Postman CLI to automate the API version publishing process. ## `postman publish api` Publish a snapshot of an API for the given API ID. All elements linked to the API are published by default. You can choose which elements to publish by using other command options. When publishing an API that's linked with Git, you must enter the command from inside the local Git repo. Also, you must provide paths to the schema directory and collection paths instead of IDs. To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login). ### Usage ```bash postman api publish ``` The unique identifier of the API to publish. ### Options Specifies the name of the version to publish. Enter release notes as a string in quotes for the version to publish. This option supports Markdown. Specifies the collections to publish. If the API is linked with Git, provide the `filePath` instead of the ID. Specifies the API specification to publish. If the API is linked with Git, provide the `schemaDirectoryPath` or `schemaRootFilePath` instead of the ID. Specifies not to poll for completion status of the publish action. Specifies whether to override the default exit code for the current run. ### Example ```bash postman api publish 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --name v1\ --release-notes "# Some release notes information"\ --collections \ --api-definition ```