> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Postman CLI secret commands `(postman secret)`

> Create secrets in your team's Postman Shared Vault from the command line with secret commands.

This topic covers secret-related commands for the [Postman CLI](/docs/postman-cli/postman-cli-overview/).

Use the `postman secret` commands to manage secrets in your team's [Shared Vault](/docs/use/postman-vault/postman-vault-key/#postman-shared-vault) from the command line. This supports secure credential management in your automation and CI workflows.

## `postman secret create`

Creates a secret in your team's Shared Vault. Sign in with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login) or pass an `--api-key`, and target a team and a workspace.

The command never accepts the secret value as a command-line argument, which keeps it out of your shell history and process list. It reads the value from a masked prompt when you run it in a terminal. To supply the value in automation, pipe it through standard input or pass `--value-stdin`.

### Usage

```bash
postman secret create <key> [options]
```

**`<key>`**

The key for the new secret.

---

### Options

**`--team-id <id>`**

The ID of the team whose Shared Vault the secret is created in. Defaults to your authenticated profile's team. This must be your own team.

---

**`-w, --workspace <workspaceId>`**

The Postman workspace ID. If omitted, the command uses the workspace bound to your local project by [`postman init`](/docs/postman-cli/postman-cli-init/#postman-init).

---

**`--api-key <key>`**

Your Postman API key. If omitted, the command uses your `postman login` session.

---

**`--value-stdin`**

Reads the secret value from standard input instead of prompting for it. Use this in automation and CI pipelines.

---

### Examples

```bash
postman secret create MY_SECRET --team-id 451 --workspace 12345678-90ab-cdef-1234-567890abcdef

# Use a CI-injected variable so the raw secret stays out of your shell history.
printf '%s' "$MY_SECRET_VALUE" | postman secret create MY_SECRET --team-id 451 --value-stdin
```