Authentication commands
You can use the Postman CLI to sign in and out of Postman with the login and logout commands. If you started out signed out, use signup to turn that work into a full Postman account.
Any local operations work without a login requirement. Commands that interact with the Postman cloud require you to be signed in.
If you’re using the Postman CLI from a network with outbound restrictions, you must allowlist specific domains to connect to Postman.
postman login
The login command prompts you to securely sign in and authenticate from the browser.
If you purchased a Postman EU Data Residency plan, the login command also requires the --region option. Use this option with the argument eu to specify that your instance of Postman is hosted in the EU region.
You can also use the --with-api-key option to authenticate using your Postman API key. This method is recommended when using the Postman CLI from your CI/CD pipeline, but you can also use this method from your local machine.
You remain signed in until you use the logout command or your Postman credentials or API key expire.
Usage
Options
Authenticate the user with the given API key.
Specify that your instance of Postman is hosted in the EU region. Accepts eu.
Shows detailed error information for the authentication attempt.
Examples
postman signup
Signs up for a Postman account to keep the work you created as a guest. When you run postman init without signing in first, the CLI creates a temporary guest workspace for your project. Use postman signup to claim that workspace under a new account so your work isn’t lost. Signing in with postman login or signing out with postman logout ends the guest session without keeping that work.
While you’re working as a guest, most CLI commands end with a reminder that your guest work may be lost until you claim it with postman signup. This reminder is skipped for the whoami, login, signup, logout, and init commands, for machine-readable output (--json or piped), under --silent, and when you set POSTMAN_CLI_SKIP_GUEST_NOTICE=1.
As a guest, you can also run the cloud postman collection and postman monitor commands without signing in first, using the guest session that postman init creates. A Postman API key or a postman login session takes precedence when one is present.
Sign-up happens in a browser. On an interactive terminal, the command opens the sign-up URL for you, waits, and signs this CLI in automatically once you finish. A single command takes you from guest to signed in. When output is piped, or you pass --json, the command prints the URL instead of opening a browser and still waits to sign you in.
The command waits for sign-up only when the browser can redirect back to the CLI on localhost. In environments where it can’t, such as an SSH session, a container, CI, or a configured Postman authentication service, the command prints the URL and exits without waiting. In those cases, finish by running postman login.
Usage
Options
Starts working as an anonymous guest instead of signing up. No account or browser is needed, so it works anywhere. Your work is saved to a temporary workspace that you can keep by running postman signup later.
Prints the sign-up details as JSON for machine-readable output.
Examples
postman logout
The logout command signs you out of Postman and deletes the stored API key.
Usage
Examples
postman whoami
This command shows the Postman account or guest session the CLI is using. Use it to verify your session in automated and local workflows. For example, confirm which account a CI job is authenticated as, or check whether you’re operating as an anonymous guest. If neither an account nor a guest session is active, the command reports that and points you to postman signup or postman login.
Usage
Options
Prints the current identity as JSON for machine-readable output.