> ## Documentation Index
> Fetch the complete documentation index at: https://kapso-1adbad2d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List function secrets

> Lists all secrets configured for a function. Only secret names are returned - values are never exposed.
The function must be deployed to have secrets.




## OpenAPI

````yaml api/legacy/openapi-functions.yaml get /functions/{function_id}/secrets
openapi: 3.0.3
info:
  title: Kapso External API - Functions and App Accounts API
  description: >-
    API for programmatically managing and invoking Kapso Functions, and for
    making API calls to connected app accounts through the Pipedream proxy. This
    specification includes all Functions and App Accounts API endpoints.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /functions/{function_id}/secrets:
    get:
      tags:
        - Function Secrets
      summary: List function secrets
      description: >
        Lists all secrets configured for a function. Only secret names are
        returned - values are never exposed.

        The function must be deployed to have secrets.
      operationId: listFunctionSecrets
      parameters:
        - name: function_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: List of secrets
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      secrets:
                        type: array
                        items:
                          $ref: '#/components/schemas/FunctionSecret'
                        example:
                          - name: API_KEY
                            type: secret_text
                          - name: DATABASE_URL
                            type: secret_text
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Failed to fetch secrets from function platform
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FunctionSecret:
      type: object
      properties:
        name:
          type: string
          example: API_KEY
          description: The name of the secret (environment variable name)
        type:
          type: string
          example: secret_text
          description: The type of secret (always 'secret_text' for now)
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        status:
          type: integer
          example: 404
        message:
          type: string
          example: The requested resource could not be found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required for all endpoints

````