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

# Detach a Secret from a Function

> Detach a secret from a Function, taking effect on the Function's next invocation. Note: Detaching a secret that is not attached succeeds to support idempotency.



## OpenAPI

````yaml delete /v1/functions/{id}/secrets/{secretId}
openapi: 3.0.0
info:
  title: Browserbase API
  description: Browserbase API for 3rd party developers
  version: v1
servers:
  - url: https://api.browserbase.com
    description: Public endpoint
    variables: {}
security:
  - BrowserbaseAuth: []
tags: []
paths:
  /v1/functions/{id}/secrets/{secretId}:
    delete:
      summary: Detach a Secret from a Function
      description: >-
        Detach a secret from a Function, taking effect on the Function's next
        invocation. Note: Detaching a secret that is not attached succeeds to
        support idempotency.
      operationId: Functions_detachSecret
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: secretId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The secret was detached from the function.
        '400':
          description: Invalid request. The Function ID and secret ID must be UUIDs.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    description: HTTP status code
                    type: integer
                  error:
                    description: HTTP error name
                    type: string
                  message:
                    description: Human-readable error message
                    type: string
                required:
                  - statusCode
                  - error
                  - message
        '404':
          description: >-
            The Function does not exist in the project. Detaching a secret that
            is not attached succeeds.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    description: HTTP status code
                    type: integer
                  error:
                    description: HTTP error name
                    type: string
                  message:
                    description: Human-readable error message
                    type: string
                required:
                  - statusCode
                  - error
                  - message
components:
  securitySchemes:
    BrowserbaseAuth:
      type: apiKey
      in: header
      name: X-BB-API-Key
      description: Your [Browserbase API Key](https://www.browserbase.com/settings).

````