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

# Create Organization Api Key

> Issue a new API key for an existing org. Firebase-authed.

Scope rules:
- ``scope_type="workspace"``: caller must have role >= editor in the
  org (viewers are blocked explicitly). The key inherits the caller's
  current role at request time; if their role is later downgraded,
  the key's authority shrinks with it.
- ``scope_type="personal"``: the key is tied to the caller as an
  individual. No org-role gate. ``org_id`` is still stored on the
  record for audit.



## OpenAPI

````yaml /openapi.json post /organizations/{org_id}/api-keys
openapi: 3.1.0
info:
  title: Overten API
  version: 1.0.0
  description: >-
    Generate and edit Word, Excel, and PowerPoint documents programmatically.
    Powered by the same agents as the Overten web app.
  contact:
    name: Overten Support
    url: https://overten.ai/support
    email: support@overten.ai
  license:
    name: Terms of Service
    url: https://overten.ai/terms
servers:
  - url: https://backend.overtenai.com/api/v1
    description: Production
  - url: http://localhost:8000/api/v1
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /organizations/{org_id}/api-keys:
    post:
      tags:
        - public
        - signup
      summary: Create Organization Api Key
      description: |-
        Issue a new API key for an existing org. Firebase-authed.

        Scope rules:
        - ``scope_type="workspace"``: caller must have role >= editor in the
          org (viewers are blocked explicitly). The key inherits the caller's
          current role at request time; if their role is later downgraded,
          the key's authority shrinks with it.
        - ``scope_type="personal"``: the key is tied to the caller as an
          individual. No org-role gate. ``org_id`` is still stored on the
          record for audit.
      operationId: create_organization_api_key_api_v1_organizations__org_id__api_keys_post
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            title: Org Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKeyRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateKeyRequest:
      properties:
        name:
          type: string
          maxLength: 80
          title: Name
          default: default
        scope_type:
          type: string
          enum:
            - personal
            - workspace
          title: Scope Type
          default: workspace
      type: object
      title: CreateKeyRequest
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Send `X-API-Key: sk_live_<your_key>`. Keys are issued via POST /signup
        or via the dashboard. Legacy callers may also use `Authorization: Bearer
        sk_live_<your_key>`.

````