Skip to main content
A vault maps environment variable names to secrets, such as DB_URL to app-db-url. You pass the vault by name to a sandbox to set all its variables at once, or attach it to a browser session to fill a login by its entry names. A vault holds no values itself: each entry points at a stored secret. To read values from 1Password instead, pass 1Password fields with the request.
Vaults are part of Secrets, which are enabled for teams on request, and use the same scopes: secrets.manage to create and change vaults, secrets.read to read them, and secrets.use to pass them to sandboxes and sessions.

Create a vault

Each entry names a secret, and optionally a version to pin. Without a version, the entry follows the secret’s latest version.
Entry names are environment variable names: letters, digits and _, not starting with a digit. Any secret type except op_token can be an entry. Entries can be customer-protected secrets; pass such a vault as vaults.unwrap() returns it.

Use a vault

Vault injection into sandbox processes and startup commands is supported for CPU sandboxes. GPU and macOS sandboxes do not support it. Browser credential fill is described separately in Credential fill. Pass vault when you run a command or create a sandbox. The vault’s variables come first, and any secrets you also pass are merged over them:
See Pass a vault for the merge rules and what the response reports. To fill a login in a browser session, attach the vault with credentials: [{ vault: "github-login" }] and fill by entry name; see Credential fill.

Change a vault

An update replaces only the entries you pass; null removes one. Vault methods take a name or ID.
The API addresses vaults by ID; find one by name with GET /api/vaults?search=app-env. A vault returns its entries with each secret’s name, secretId and pinned version (null follows the latest). Changing or deleting a vault doesn’t affect processes that already started. A browser session attaches the vault itself, so each fill uses the vault’s entries as they are at that moment.

Limits

  • 100 vaults per team and 32 entries per vault.
  • Names are 1–128 letters, digits, _ or -, starting with a letter or digit, and unique within your team.

Errors