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

# List secrets

> <p>List all your secrets. Returns metadata only, not the actual credentials.</p>



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/indices/openapi.documented.yml get /v1beta/secrets
openapi: 3.1.0
info:
  title: Indices API
  description: 'The Indices REST API. See docs for details: https://docs.indices.io'
  version: 0.0.1
servers:
  - url: https://api.indices.io
security:
  - ApiKeyAuth: []
tags:
  - name: Tasks
    description: Create a task to repeatedly perform an action on an external website.
  - name: Runs
    description: Execute a task.
  - name: Secrets
    description: Manage secrets like login credentials and API keys.
paths:
  /v1beta/secrets:
    get:
      tags:
        - Secrets
      summary: List secrets
      description: >-
        <p>List all your secrets. Returns metadata only, not the actual
        credentials.</p>
      operationId: list_user_secrets_v1beta_secrets_get
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Secret'
                type: array
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Indices from 'indicesio';

            const client = new Indices({
              apiKey: process.env['INDICES_API_KEY'], // This is the default and can be omitted
            });

            const secrets = await client.secrets.list();

            console.log(secrets);
        - lang: Python
          source: |-
            import os
            from indices import Indices

            client = Indices(
                api_key=os.environ.get("INDICES_API_KEY"),  # This is the default and can be omitted
            )
            secrets = client.secrets.list()
            print(secrets)
components:
  schemas:
    Secret:
      properties:
        id:
          type: string
          description: Unique identifier for the secret.
        name:
          type: string
          description: Human-readable name for the secret.
        secret_type:
          $ref: '#/components/schemas/SecretType'
          description: 'Type of secret: ''login'' or ''string''.'
        website:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional website URL.
        has_totp:
          type: boolean
          description: >-
            Whether the secret has a TOTP configured (only applicable for login
            type).
        created_at:
          type: string
          format: date-time
          description: Timestamp when the secret was created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the secret was last updated.
      type: object
      required:
        - id
        - name
        - secret_type
        - website
        - has_totp
        - created_at
        - updated_at
      title: Secret
    SecretType:
      type: string
      enum:
        - login
        - string
      title: SecretType
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Enter your API key as the bearer token. Set header: `Authorization` to
        `Bearer <api_key>`

````