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, or, in a 1Password vault, at a field in your 1Password account.
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.

Use a vault

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 keeps the secrets the vault pointed at when the session was created, so an entry changed since then can’t be filled in it.

1Password vaults

A 1Password vault reads its values from your 1Password account each time a sandbox process starts, so you can keep using 1Password as the source of truth. Hyperbrowser signs in with a 1Password service account token that you store as a secret of type op_token. The token is only used to read the vault’s fields, and never reaches a process or page. First store the token, then create the vault with its source: the token secret and the 1Password vault’s name or ID. Each entry names an item, an optional section, and a field.
Each entry becomes a secret reference, op://<vault>/<item>/[<section>/]<field>, which the vault returns as reference. Items, sections and fields are names or IDs without / or ?; use the ID for a name that contains one. A field may end with a query: ?attribute=otp reads the current one-time password of a TOTP field instead of its seed. A reference can be at most 512 bytes. Entries are only checked against 1Password when a process starts. To rotate the token, add a version to the op_token secret. To point the vault at a different token or 1Password vault, update its source:
A vault’s source type is fixed when you create it. 1Password vaults work for sandbox processes and startup commands, not for browser sessions.

1Password errors

When 1Password can’t provide a value, nothing starts and you get one of these:

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