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

# Get keys

> List all API keys with their metadata



## OpenAPI

````yaml /openapi.json get /keys
openapi: 3.1.0
info:
  title: Keyflare API
  description: >-
    Open-source secrets manager built entirely on Cloudflare. One Worker. One D1
    database. Zero trust storage.
  version: 0.1.0
  contact:
    name: Keyflare
    url: https://github.com/keyflare/keyflare
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: '{baseUrl}'
    description: Your Keyflare deployment
    variables:
      baseUrl:
        default: https://keyflare.YOUR_ACCOUNT.workers.dev
        description: >-
          Base URL of your Keyflare Worker (e.g. https://secrets.example.com or
          https://keyflare.my-account.workers.dev)
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Health check endpoints
  - name: Bootstrap
    description: Initial setup endpoints
  - name: Keys
    description: API key management
  - name: Projects
    description: Project management
  - name: Environments
    description: Environment management
  - name: Secrets
    description: Secret management
paths:
  /keys:
    get:
      tags:
        - Keys
      description: List all API keys with their metadata
      operationId: getKeys
      responses:
        '200':
          description: List of API keys
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    const: true
                  data:
                    type: object
                    properties:
                      keys:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            prefix:
                              type: string
                            type:
                              type: string
                              enum:
                                - user
                                - system
                            label:
                              type: string
                            scopes:
                              type:
                                - array
                                - 'null'
                              items:
                                type: object
                                properties:
                                  project:
                                    type: string
                                  environment:
                                    type: string
                                required:
                                  - project
                                  - environment
                            permission:
                              type: string
                            created_at:
                              type: string
                            last_used_at:
                              type:
                                - string
                                - 'null'
                            revoked:
                              type: boolean
                          required:
                            - id
                            - prefix
                            - type
                            - label
                            - scopes
                            - permission
                            - created_at
                            - last_used_at
                            - revoked
                    required:
                      - keys
                required:
                  - ok
                  - data
        '400':
          description: Bad Request - Invalid request body or parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - BAD_REQUEST
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - CONFLICT
                          - INTERNAL_ERROR
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - ok
                  - error
        '401':
          description: Unauthorized - Missing, invalid, or revoked API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - BAD_REQUEST
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - CONFLICT
                          - INTERNAL_ERROR
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - ok
                  - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - BAD_REQUEST
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - CONFLICT
                          - INTERNAL_ERROR
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - ok
                  - error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication (kfl_user_* or kfl_sys_*)

````