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

# Get Api Key

> Get API key by ID.



## OpenAPI

````yaml api-reference/openapi.json get /api/v1/api-keys/{api_key_id}
openapi: 3.1.0
info:
  title: FastAPI app
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/api-keys/{api_key_id}:
    get:
      tags:
        - API Keys
      summary: Get Api Key
      description: Get API key by ID.
      operationId: get_api_key_api_v1_api_keys__api_key_id__get
      parameters:
        - name: api_key_id
          in: path
          required: true
          schema:
            type: string
            title: Api Key Id
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The workspace ID
            title: X-Workspace-Id
          description: The workspace ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - DualAuthScheme: []
components:
  schemas:
    ApiKeyRead:
      properties:
        id:
          type: string
          title: Id
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        key:
          type: string
          maxLength: 50
          minLength: 1
          title: Key
          description: API key identifier
        hashed_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Hashed Secret
          description: Hashed API key secret
        label:
          type: string
          maxLength: 255
          minLength: 1
          title: Label
          description: API key label/name
        status:
          type: string
          title: Status
          description: API key status
          default: active
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
          description: When the API key was last used
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
          description: API key expiration date
        permissions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Permissions
          description: List of permissions granted to this API key
        ip_whitelist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Ip Whitelist
          description: List of allowed IP addresses
        collections:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Collections
          description: List of collection IDs this API key can access
        workspace_id:
          type: string
          title: Workspace Id
          description: Reference to workspace
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
          description: User who created the API key
        secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Secret
          description: API key secret
      type: object
      required:
        - key
        - label
        - workspace_id
      title: ApiKeyRead
      description: Schema for reading API key data.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    DualAuthScheme:
      type: http
      scheme: bearer

````