> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-chore-regenerate-agent-sdk-openapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Secrets

> List available secret names, optionally scoped by an agent profile.



## OpenAPI

````yaml /openapi/agent-sdk.json get /api/settings/secrets
openapi: 3.1.0
info:
  description: OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
  title: OpenHands Agent Server
  version: 1.52.0
servers: []
security: []
paths:
  /api/settings/secrets:
    get:
      tags:
        - Settings
      summary: List Secrets
      description: List available secret names, optionally scoped by an agent profile.
      operationId: list_secrets_api_settings_secrets_get
      parameters:
        - in: query
          name: agent_profile_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Agent Profile Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretsListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    SecretsListResponse:
      description: |-
        Response model for GET /api/settings/secrets.

        Lists all available secrets with their names and descriptions.
        Values are never included in list responses.
      properties:
        secrets:
          items:
            $ref: '#/components/schemas/SecretItemResponse'
          title: Secrets
          type: array
      required:
        - secrets
      title: SecretsListResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SecretItemResponse:
      description: |-
        Response model for a secret item (without value).

        Used in list responses and as the response for create/update operations.
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        name:
          title: Name
          type: string
      required:
        - name
      title: SecretItemResponse
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-Session-API-Key
      type: apiKey

````

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