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

# Create API Key

> Create a new API key for the project. The full key value is returned **only
once** in the response — store it securely.

Keys start with `lc_proj_` and are 64-character hex strings.




## OpenAPI

````yaml POST /api/admin/api-keys
openapi: 3.1.0
info:
  title: LogClaw API
  description: >
    LogClaw Cloud API for log ingestion, API key management, incident
    monitoring,

    and infrastructure health. All endpoints are authenticated via the

    `x-logclaw-api-key` header.


    Generate an API key from your project dashboard at

    [console.logclaw.ai](https://console.logclaw.ai) under **Settings → API
    Keys**.
  version: 1.0.0
  contact:
    name: LogClaw
    url: https://docs.logclaw.ai
servers:
  - url: https://otel.logclaw.ai
    description: LogClaw Cloud
security:
  - apiKey: []
tags:
  - name: Ingestion
    description: OTLP log ingestion
  - name: API Keys
    description: API key management
  - name: Bridge
    description: ETL pipeline health and configuration
  - name: Ticketing
    description: Incident management and runtime config
  - name: Infrastructure
    description: Cluster health monitoring
  - name: OpenSearch
    description: Log storage and search
paths:
  /api/admin/api-keys:
    post:
      tags:
        - API Keys
      summary: Create API Key
      description: >
        Create a new API key for the project. The full key value is returned
        **only

        once** in the response — store it securely.


        Keys start with `lc_proj_` and are 64-character hex strings.
      operationId: createApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: A descriptive label for the key
                  example: production-backend
            example:
              name: production-backend
      responses:
        '201':
          description: API key created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  key:
                    type: string
                    description: The full API key — shown only once
                  createdAt:
                    type: string
                    format: date-time
              example:
                id: key_ghi789
                name: production-backend
                key: >-
                  lc_proj_5a33915526cd1af8238c6e690eeff9cec2611750d9914d2dd1cc7a87cf08c717
                createdAt: '2024-03-01T10:00:00Z'
        '401':
          description: Invalid or missing API key
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-logclaw-api-key
      description: Your project API key (starts with `lc_proj_`)

````