Share API Collections With Your Team Without Sharing Secrets

Sharing a collection of API requests is easy. Sharing the keys and tokens that make those requests work is where teams get into trouble: a key pasted into a shared environment, an exported file sent in chat, a token nobody rotates. This guide shows a practical split between what to share and what to keep private.

Separate the shape of a request from its secrets

A request has two parts: its shape (method, address, headers, body layout) and the values that make it work (API keys, tokens, passwords). The shape is safe and useful to share. The values are not. Everything else in this guide follows from keeping those two apart.

OWASP's secrets management guidance puts it plainly: keep secrets out of source code and configuration files, and inject them at runtime or fetch them from a secrets manager. A shared collection file is configuration.

A quick test: if you pasted your collection and environment into a public chat right now, would anything in them let a stranger call your API as you? If yes, those values do not belong in the shared copy.

  • Shape (safe to share): method, path, header names, body layout, variable names
  • Values (keep private): API keys, bearer tokens, passwords, client secrets, production hostnames if they are sensitive

Use variables, and know their scopes

Replace every key and host in your requests with a variable. Postman's documentation describes five variable scopes: global, collection, environment, data and local. When the same name exists in two scopes, the narrowest scope wins. Environments map to things like development, testing or production, and only one is active at a time. The global scope is available throughout a workspace and is described as suited to testing and prototyping, so it is a poor home for anything sensitive.

Postman also separates a local value, which stays on your own instance unless you share it, from a shared value, which gives teammates a default. That is the mechanism to rely on: share the variable name and a safe default, keep the real value local.

  • Use one environment per stage (development, testing, production)
  • Put only harmless defaults in values that get shared
  • Keep real keys in local values or in a vault, never in the shared value

Use a vault for sensitive values

Postman's documentation recommends storing sensitive data as vault secrets, which keeps sensitive values separate from your collections, environments and other shared items. Whatever tool you use, look for the same property: the secret is stored apart from the thing you share, and each person supplies or unlocks their own.

Apply least privilege, separate environments and rotation

OWASP's guidance gives a short list that fits API work well:

  • Least privilege: give each person only the access they need, and do not give everyone every secret
  • Separate environments: keep production and development secrets apart, and restrict access to production
  • Rotate secrets regularly so a stolen credential has a limited useful life, and rotate at once if you suspect a leak
  • Audit: know who used a secret and when it was created or changed

Move a collection without leaking it

Postman's import documentation says it accepts Postman collections and environments, OpenAPI definitions, cURL commands and files from other API clients. Before you export or send a collection to anyone, open the environment and check that no real secret is in a shared value. Send the collection and the environment as separate files, and send the environment only to people who need it.

When someone leaves the team, rotate the keys they could reach. Removing them from the workspace does not change a key they already copied.

  • Open each environment and look for real keys in shared values
  • Export the collection and the environment as separate files
  • Send the environment only to people who need it, and not over chat or email if you can avoid it
  • Note the date you shared it, so you know what to rotate if it leaks

Where CollectionPier fits

CollectionPier is coming soon. It is built around this split: a shared workspace of collections and environments where a variable marked secret shares only its name, and each member's value is encrypted and visible only to that person. It imports Postman and OpenAPI files and exports to Postman. We have not set a launch date.

Sources

Coming soon: CollectionPier

A shared API workspace for developer teams, one flat price. CollectionPier is a shared workspace where a developer team keeps its API requests, environments and variables, and runs requests from the browser. Secrets are stored per person, encrypted, and a server-side runner sends the requests. You can import from Postman or OpenAPI and export back to Postman. It is for small teams that want one flat price instead of a price per user.

About CollectionPierPrice comparison

Get CollectionPier first

Join the list and get 25% off your first purchase when it goes on sale. We email you a discount code on launch day. One code per person, for new customers.

One email when it launches (plus the discount code). No other mail, and you can say stop at any time. See our privacy policy.

An unhandled error has occurred. 🗙