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

# Create Api Key

> Create the first API key for a project. Requires the platform credential
(X-Platform-Key) — only the builder bootstraps keys (ADR-0011).

After the first key exists, use authenticated endpoints to manage keys.



## OpenAPI

````yaml /openapi.json post /v1/api-keys
openapi: 3.1.0
info:
  title: TurnCall
  description: Production voice agent platform API
  version: 0.1.0
servers: []
security: []
paths:
  /v1/api-keys:
    post:
      tags:
        - api-keys
      summary: Create Api Key
      description: |-
        Create the first API key for a project. Requires the platform credential
        (X-Platform-Key) — only the builder bootstraps keys (ADR-0011).

        After the first key exists, use authenticated endpoints to manage keys.
      operationId: create_api_key_v1_api_keys_post
      parameters:
        - name: project_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: x-platform-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Platform-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Create Api Key V1 Api Keys Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateApiKeyRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        role:
          $ref: '#/components/schemas/ProjectRole'
          default: developer
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
      type: object
      required:
        - name
      title: CreateApiKeyRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProjectRole:
      type: string
      enum:
        - admin
        - developer
        - viewer
      title: ProjectRole
    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

````