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

# List Api Keys

> List all API keys for the current user



## OpenAPI

````yaml /api-reference/openapi-developer.json get /api/v1/proxy/api-keys
openapi: 3.1.0
info:
  title: PromptGuard Developer API
  description: >-
    Public API for developers to integrate PromptGuard security into their
    applications
  version: 1.0.0
servers:
  - url: https://api.promptguard.dev
    description: Production API
  - url: https://staging-api.promptguard.dev
    description: Staging API
  - url: http://localhost:8080
    description: Local Development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/proxy/api-keys:
    get:
      tags:
        - api-keys
      summary: List Api Keys
      description: List all API keys for the current user
      operationId: list_api_keys_api_v1_proxy_api_keys_get
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiKeyResponse'
                title: Response List Api Keys Api V1 Proxy Api Keys Get
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ApiKeyResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        prefix:
          type: string
          title: Prefix
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        project_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Name
        permissions:
          items:
            type: string
          type: array
          title: Permissions
        is_active:
          type: boolean
          title: Is Active
        last_used_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Used At
        expires_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Expires At
        created_at:
          type: string
          title: Created At
      type: object
      required:
        - id
        - name
        - prefix
        - project_id
        - project_name
        - permissions
        - is_active
        - last_used_at
        - created_at
      title: ApiKeyResponse
    AuthErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
          examples:
            - code: missing_api_key
              message: >-
                PromptGuard API key required. Please provide via X-API-Key
                header.
              type: authentication_error
      type: object
      required:
        - error
      title: AuthErrorEnvelope
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error description
        type:
          type: string
          title: Type
          description: Error category, e.g. 'authentication_error'
        code:
          type: string
          title: Code
          description: Machine-readable error code
      type: object
      required:
        - message
        - type
        - code
      title: ErrorDetail
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        PromptGuard API key for developer endpoints. Keys start with pg_live_
        and are created in the dashboard.

````