> ## Documentation Index
> Fetch the complete documentation index at: https://hyperbrowser.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a wrapped vault

> Get the wrapped envelopes of a vault's customer-protected entries.

See [customer-protected secrets](https://hyperbrowser.ai/docs/sandboxes/customer-keys.md#use-it-in-a-vault) for SDK examples. The SDKs' `vaults.unwrap()` calls this and unwraps the entries for you.


## OpenAPI

````yaml openapi.json GET /api/vaults/{id}/wrapped
openapi: 3.0.1
info:
  title: Hyperbrowser API
  version: 1.0.0
servers:
  - url: https://api.hyperbrowser.ai
    description: Production server
security: []
paths:
  /api/vaults/{id}/wrapped:
    get:
      summary: Get a wrapped vault
      description: >-
        Returns the wrapped envelopes of a vault's customer-protected entries,
        each at the version its entry resolves to now. Unwrap them with your key
        and pass the vault to a sandbox or process as `{name, unwrapped}`. See
        [Customer-protected secrets](/sandboxes/customer-keys). Secrets are
        enabled for teams on request; please contact support to enable them
        (otherwise 403 SECRETS_FEATURE_DISABLED). Restricted API keys need the
        secrets.use scope. When you're signed in rather than using an API key,
        you must be a team owner or admin (otherwise 403
        SECRETS_ADMIN_REQUIRED).
      operationId: getWrappedVault
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Vault ID.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WrappedVault'
        '400':
          description: Invalid vault ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretErrorResponse'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretErrorResponse'
        '403':
          description: >-
            API_KEY_SCOPE_DENIED (the API key lacks a required scope),
            SECRETS_FEATURE_DISABLED, or SECRETS_ADMIN_REQUIRED.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretErrorResponse'
        '404':
          description: >-
            VAULT_NOT_FOUND, or SECRET_VERSION_NOT_FOUND: a customer-protected
            entry has no value yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WrappedVault:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        entries:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/WrappedVaultEntry'
          description: >-
            The vault's customer-protected entries only, by environment
            variable, each at the version it resolves to now.
      required:
        - id
        - name
        - entries
    SecretErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code, such as SECRET_NOT_FOUND.
        message:
          type: string
        error:
          type: string
          description: >-
            Set instead of `code` by authentication and API key scope errors
            (API_KEY_SCOPE_DENIED).
        requiredScopes:
          type: array
          items:
            type: string
          description: The scope the API key is missing, with API_KEY_SCOPE_DENIED.
        retryable:
          type: boolean
          description: >-
            Whether repeating the same request can succeed. Set on delivery
            errors.
        details:
          type: object
          additionalProperties: true
          description: >-
            Extra information for some codes, such as `origin` for
            CREDENTIAL_ORIGIN_NOT_ALLOWED or `pages` for
            CREDENTIAL_PAGE_AMBIGUOUS.
      description: >-
        HTTP failure. Secret errors include `code` and `message`; request
        validation errors include only `message`; API key scope errors include
        `error`, `message` and `requiredScopes`.
    WrappedVaultEntry:
      allOf:
        - type: object
          properties:
            name:
              type: string
              description: The secret's name.
            secretId:
              type: string
              format: uuid
          required:
            - name
            - secretId
        - $ref: '#/components/schemas/WrappedSecretVersion'
    WrappedSecretVersion:
      type: object
      description: >-
        A customer-protected version as stored. Unwrap `envelope` with your key
        to get the inner envelope each use passes as `unwrapped`.
      properties:
        version:
          type: integer
          minimum: 1
        kid:
          type: string
          description: ID of the platform public key the inner envelope is encrypted to.
        retiresAt:
          type: string
          format: date-time
          nullable: true
          description: When that platform key is retired, or null.
        outerKid:
          type: string
          description: ID of your key that wrapped the version.
        innerDigest:
          type: string
          description: >-
            Unpadded base64url SHA-256 of the inner envelope. Check the envelope
            you unwrap against it.
        envelope:
          type: string
          description: The wrapped envelope, which only your key can open.
      required:
        - version
        - kid
        - retiresAt
        - outerKid
        - innerDigest
        - envelope
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.