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

# Create

> Create an API key. The full secret is shown once and never retrievable later.



## OpenAPI

````yaml /openapi.json post /v1/orgs/{orgId}/api-keys
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/api-keys:
    post:
      tags:
        - apikeys
      summary: Create
      description: >-
        Create an API key. The full secret is shown once and never retrievable
        later.
      operationId: apikeys.create
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
      requestBody:
        required: true
        x-korve-max-bytes: 1048576
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  pattern: ^.{1,100}$
                  description: Display name, 1-100 characters.
                role:
                  type: string
                  enum:
                    - member
                    - admin
                  description: >-
                    Role ceiling the key authenticates with. Defaults to
                    "admin"; never owner.
              required:
                - name
      responses:
        '201':
          description: >-
            API key created. `key` is the full secret — shown exactly once;
            store it securely.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  keyPrefix:
                    type: string
                    description: >-
                      Display handle for the key, e.g. "korve_ab12…". Never the
                      secret.
                  role:
                    type: string
                    enum:
                      - member
                      - admin
                    description: >-
                      Role ceiling the key authenticates with. Defaults to
                      "admin"; never owner.
                  key:
                    type: string
                    pattern: ^korve_[0-9a-f]{40}$
                    description: >-
                      The full secret. Shown exactly once — it is never
                      retrievable later.
                required:
                  - id
                  - name
                  - keyPrefix
                  - role
                  - key
        '422':
          description: Invalid name or role (owner keys do not exist).
      security:
        - session: []
components:
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````