# Create and Use Postman Secrets from the CLI

DevFeed: [Create and Use Postman Secrets from the CLI](<https://devfeed.tech/articles/create-and-use-postman-secrets-from-the-cli-91129.md>)

Original publisher: [Read original article](<https://blog.postman.com/create-and-use-postman-secrets-from-the-cli/>)

Author: Harsh Vardhan

Published: 2026-10-20T15:00:24Z

Content type: tutorial

Language: en

Sources: [Postman](<https://devfeed.tech/sources/postman-blog.md>)

Topics: [Postman CLI](<https://devfeed.tech/topics/postman-cli.md>), [Secrets Management](<https://devfeed.tech/topics/secrets-management.md>), [CI/CD secrets management](<https://devfeed.tech/topics/ci-cd-secrets-management.md>), [Cybersecurity](<https://devfeed.tech/topics/cybersecurity.md>), [secret rotation](<https://devfeed.tech/topics/secret-rotation.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [api](<https://devfeed.tech/tags/api.md>), [api-development](<https://devfeed.tech/tags/api-development.md>), [app](<https://devfeed.tech/tags/app.md>), [arguments](<https://devfeed.tech/tags/arguments.md>), [artifacts](<https://devfeed.tech/tags/artifacts.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [automated](<https://devfeed.tech/tags/automated.md>), [automation](<https://devfeed.tech/tags/automation.md>), [bearer](<https://devfeed.tech/tags/bearer.md>), [bearer-token](<https://devfeed.tech/tags/bearer-token.md>), [cli](<https://devfeed.tech/tags/cli.md>), [collection](<https://devfeed.tech/tags/collection.md>), [environment](<https://devfeed.tech/tags/environment.md>), [general](<https://devfeed.tech/tags/general.md>), [postman](<https://devfeed.tech/tags/postman.md>), [postman-cli](<https://devfeed.tech/tags/postman-cli.md>), [postman-vault](<https://devfeed.tech/tags/postman-vault.md>), [secret](<https://devfeed.tech/tags/secret.md>), [secrets](<https://devfeed.tech/tags/secrets.md>), [secrets-management](<https://devfeed.tech/tags/secrets-management.md>), [variable](<https://devfeed.tech/tags/variable.md>), [vault](<https://devfeed.tech/tags/vault.md>)

## AI overview

The Postman CLI can create a Shared Vault secret, link it to an environment variable, and resolve it at runtime for both standalone requests and Collection runs. Create secrets with `postman secret create`, entering the value through a masked prompt or standard input; link the returned secret ID with `postman environment var set --secret-id`. The Environment stores vault and secret identifiers, while requests and Collections use familiar `{{variableName}}` syntax. The workflow supports cloud Environments and local environment files, and requires CLI 1.69.0 or later, an authenticated session, and permission to create workspace secrets. Vault linking keeps plaintext out of Postman artifacts, but resolved credentials can still reach or appear in logs from requests, scripts, diagnostics, or destination systems. The article recommends provisioning or rotating secrets deliberately and reusing existing links in routine CI runs.

## Source excerpt

Create a Postman Shared Vault secret, link it to an environment variable, and use it in standalone requests or Collection runs via the CLI. The post Create and Use Postman Secrets from the CLI appeared first on Postman Blog.