> ## 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.

# Post bootstrap

> Create the first user API key. Only works when no keys exist in the database.



## OpenAPI

````yaml /openapi.json post /bootstrap
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:
  /bootstrap:
    post:
      tags:
        - Bootstrap
      description: >-
        Create the first user API key. Only works when no keys exist in the
        database.
      operationId: postBootstrap
      responses:
        '201':
          description: Bootstrap successful - First user key created
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    const: true
                  data:
                    type: object
                    properties:
                      key:
                        type: string
                      prefix:
                        type: string
                      type:
                        type: string
                        const: user
                      label:
                        type: string
                    required:
                      - key
                      - prefix
                      - type
                      - label
                required:
                  - ok
                  - data
        '409':
          description: Bootstrap already completed - API keys already exist
          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_*)

````