> ## 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.

# Delete a vault

> Delete a vault. The secrets it points at are kept.

See the [vaults guide](/docs/sandboxes/vaults) for SDK and CLI examples.


## OpenAPI

````yaml openapi.json DELETE /api/vaults/{id}
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}:
    delete:
      summary: Delete a vault
      description: >-
        Permanently deletes a vault. The secrets it points at are kept. Secrets
        are enabled for teams on request; please contact support to enable them
        (otherwise 403 SECRETS_FEATURE_DISABLED). Restricted API keys need the
        secrets.manage 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: deleteVault
      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/VaultDeleteResponse'
        '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: no vault with this ID in your team.'
          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:
    VaultDeleteResponse:
      type: object
      properties:
        deleted:
          type: boolean
          enum:
            - true
        id:
          type: string
          format: uuid
        name:
          type: string
      required:
        - deleted
        - id
        - name
    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`.
  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.