Wispr AI Internal API

The Internal API from Wispr AI — 69 operation(s) for internal.

OpenAPI Specification

wispr-ai-internal-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Wispr Backend Analytics Internal API
  description: Wispr Backend API
  version: 0.5.2
tags:
- name: Internal
paths:
  /api/v1/internal/billing-ops/operations:
    get:
      tags:
      - Internal
      summary: List Operations
      description: List every registered operation along with its JSON schema for the form renderer.
      operationId: list_operations
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOperationsResponse'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/billing-ops/preview:
    post:
      tags:
      - Internal
      summary: Preview
      description: Validate input and run the op's preview.
      operationId: preview
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/billing-ops/commit:
    post:
      tags:
      - Internal
      summary: Commit
      description: Execute the op and emit a structured log line. No DB write.
      operationId: commit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommitRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommitResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/billing-ops/cost-centers/{enterprise_id}:
    get:
      tags:
      - Internal
      summary: List Cost Centers For Enterprise
      description: 'List cost centers under ``enterprise_id`` for the operator-UI picker.


        The UI auto-selects the only cost_center when an enterprise has exactly

        one; with multiple, the operator must pick which cost_center the op

        targets. Rows come back sorted by ``created_at`` ascending.'
      operationId: list_cost_centers_for_enterprise
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: enterprise_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Enterprise Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCostCentersResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/billing-ops/invoices/{cost_center_id}:
    get:
      tags:
      - Internal
      summary: List Recent Invoices For Cost Center
      description: 'Return the latest draft + latest open Stripe invoices for a cost_center.


        Powers the operator-UI invoice picker. The ``open`` slot subsumes

        past_due (Stripe treats past_due as ``open`` past its due_date); acting on

        it inside ``add_po_to_invoice`` triggers the void-and-reissue path, so the

        UI surfaces a "will void and re-issue" warning when that card is picked.

        The ``draft`` slot is editable in place. Either or both may be ``null``.'
      operationId: list_recent_invoices_for_cost_center
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: cost_center_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Cost Center Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRecentInvoicesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/meetings/{meeting_id}/attribution/live:
    get:
      tags:
      - Internal
      summary: Get Meeting Attribution Live
      description: Return the exact stored live-transcript NDJSON body.
      operationId: get_meeting_attribution_live
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: meeting_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Meeting Id
      responses:
        '200':
          description: Successful Response
          content:
            application/x-ndjson: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/meetings/{meeting_id}/attribution/refined:
    get:
      tags:
      - Internal
      summary: Get Meeting Attribution Refined
      description: Return the exact stored refined-transcript NDJSON body.
      operationId: get_meeting_attribution_refined
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: meeting_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Meeting Id
      responses:
        '200':
          description: Successful Response
          content:
            application/x-ndjson: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/meetings/{meeting_id}/attribution/refined-raw:
    get:
      tags:
      - Internal
      summary: Get Meeting Attribution Refined Raw
      description: Return the exact stored archived refine JSON body.
      operationId: get_meeting_attribution_refined_raw
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: meeting_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Meeting Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/meetings/{meeting_id}/attribution/speaker-observations:
    get:
      tags:
      - Internal
      summary: Get Meeting Attribution Speaker Observations
      description: Return the exact stored speaker-observation NDJSON body.
      operationId: get_meeting_attribution_speaker_observations
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: meeting_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Meeting Id
      responses:
        '200':
          description: Successful Response
          content:
            application/x-ndjson: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/meetings/{meeting_id}/attribution/speaker-consensus/preview:
    post:
      tags:
      - Internal
      summary: Preview Meeting Speaker Consensus
      description: Run one explicitly selected, non-persistent consensus preview.
      operationId: preview_meeting_speaker_consensus
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: meeting_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Meeting Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsensusPreviewRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsensusPreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/meetings/{meeting_id}/attribution/audio-url:
    get:
      tags:
      - Internal
      summary: Get Meeting Attribution Audio Url
      description: Return a scoped presigned audio URL when the meeting has audio.
      operationId: get_meeting_attribution_audio_url
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: meeting_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Meeting Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeetingAudioUrlResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/cost-centers/preview-provision:
    post:
      tags:
      - Internal
      summary: Internal Preview Cost Center Provision
      description: Server-computed preview of a sales-led cost-center provisioning. No writes, no Stripe mutations.
      operationId: internal_preview_cost_center_provision
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InternalCostCenterProvisionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalCostCenterProvisionPreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/cost-centers/provision:
    post:
      tags:
      - Internal
      summary: Internal Provision Cost Center
      description: 'Provision a sales-led cost center for a target enterprise.


        Creates the team + membership swap + a send_invoice Stripe subscription at the

        standard annual Enterprise price, with the invoice emailed to the picked user.

        Provision-or-revert: a stripe_create or stamp failure auto-reverts (rolls back

        the rows, restores the prior membership, cancels the orphaned subscription) and

        is safe to retry; only an invoice_send failure leaves the cost center ACTIVE for

        a manual finalize/send.'
      operationId: internal_provision_cost_center
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InternalCostCenterProvisionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalCostCenterProvisionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/marketing/flow-state/generate:
    post:
      tags:
      - Internal
      summary: Generate Flow State Profiles
      description: Kick off a background job that builds per-user Flow State profiles.
      operationId: generate_flow_state_profiles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateFlowStateRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketingJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/marketing/flow-state/generate-send:
    post:
      tags:
      - Internal
      summary: Generate And Send Flow State Emails
      description: Enqueue a generate+send job for all eligible Flow State profiles.
      operationId: generate_and_send_flow_state_emails
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateAndSendFlowStateRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketingJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/marketing/flow-state/send:
    post:
      tags:
      - Internal
      summary: Send Flow State Emails
      description: Kick off a background job that dispatches Flow State events to Customer.io.
      operationId: send_flow_state_emails
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendFlowStateRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketingJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/marketing/flow-state/months/{reporting_month}:
    get:
      tags:
      - Internal
      summary: Get Flow State Month Summary
      description: Return month-level Flow State generation/send state for the admin portal.
      operationId: get_flow_state_month_summary
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: reporting_month
        in: path
        required: true
        schema:
          type: string
          format: date
          description: First day of the reporting month.
          title: Reporting Month
        description: First day of the reporting month.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowStateMonthSummaryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/marketing/flow-state/preview:
    post:
      tags:
      - Internal
      summary: Preview Flow State Profiles
      description: Return generated profile rows for review before dispatch.
      operationId: preview_flow_state_profiles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowStatePreviewRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowStateProfilePreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/marketing/flow-state/jobs/{job_id}:
    get:
      tags:
      - Internal
      summary: Get Flow State Job
      description: Return the latest persisted state of a marketing job.
      operationId: get_flow_state_job
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketingJobStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/enterprises/create:
    post:
      tags:
      - Internal
      summary: Internal Create Enterprise
      description: 'Create a new enterprise for a given name/domain, and set the given email as the admin user.

        Creates a new user, enterprise, and Stripe customer.


        Only accessible by Wispr admins (@wispr.ai emails).'
      operationId: internal_create_enterprise
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnterpriseFromAdminRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/enterprises/create-pilot:
    post:
      tags:
      - Internal
      summary: Create Enterprise Pilot
      description: Create a new enterprise pilot with a user, enterprise, and discounted subscription.
      operationId: create_enterprise_pilot
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: currency
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/Currency'
          default: usd
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnterprisePilotRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/enterprises/create-sales-led:
    post:
      tags:
      - Internal
      summary: Create Sales Led Enterprise
      description: 'Create a sales-led enterprise with deferred invoicing.


        Creates the enterprise, Stripe subscription, and a draft invoice.

        The invoice stays as a draft until sales unpauses collection via /send-invoice (below).'
      operationId: create_sales_led_enterprise
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSalesLedEnterpriseRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSalesLedEnterpriseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/enterprises/create-sales-led-custom-billing:
    post:
      tags:
      - Internal
      summary: Create Sales Led Enterprise Custom Billing
      description: 'Create a sales-led enterprise with a negotiated custom billing config.


        Superadmin-gated counterpart to /create-sales-led: takes the same payload

        plus a required `custom_billing_config`. Splitting it out keeps the auth

        escalation visible in the route signature and OpenAPI, matching the

        sensitivity of /billing-configs/create.'
      operationId: create_sales_led_enterprise_custom_billing
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSalesLedEnterpriseCustomBillingRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSalesLedEnterpriseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - ApiKeyHeaderPatched: []
  /api/v1/internal/enterprises/{enterprise_id}/send-invoice:
    post:
      tags:
      - Internal
      summary: Send Enterprise Invoice
      description: Send a pending invoice for a sales-led enterprise with PO number.
      operationId: send_enterprise_invoice
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: enterprise_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Enterprise Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendInvoiceRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendInvoiceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/enterprises/{enterprise_id}/pending-invoice:
    get:
      tags:
      - Internal
      summary: Get Pending Invoice
      description: Check if an enterprise has a pending draft invoice (internal admin only).
      operationId: get_pending_invoice
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: enterprise_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Enterprise Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingInvoiceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/enterprises/{enterprise_id}/update-pilot-end:
    patch:
      tags:
      - Internal
      summary: Update Enterprise Pilot End
      description: 'Update the pilot end date for an enterprise (internal admin only).


        The new pilot_end must be at least 24 hours in the future.

        Updates Stripe subscription trial_end and all enterprise users'' trial_ends_at.'
      operationId: update_enterprise_pilot_end
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: enterprise_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Enterprise Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePilotEndRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePilotEndResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/enterprises/{enterprise_id}/reactivate-pilot:
    post:
      tags:
      - Internal
      summary: Reactivate Enterprise Pilot
      description: 'Reactivate a canceled enterprise pilot (internal admin only).


        Resolves the admin email + primary domain server-side from the enterprise''s

        existing records, then delegates to the standard create-pilot flow. Use

        update-pilot-end instead when a live subscription still exists.'
      operationId: reactivate_enterprise_pilot
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: enterprise_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Enterprise Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReactivateEnterprisePilotRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/enterprises/pilots:
    get:
      tags:
      - Internal
      summary: List Enterprise Pilots
      description: "List enterprise pilots with optional filtering (internal admin only).\n\nArgs:\n    status_filter: Filter option - 'active' (future pilot_end), 'expired' (past pilot_end or canceled), or omit for all"
      operationId: list_enterprise_pilots
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Maximum number of results
          default: 20
          title: Limit
        description: Maximum number of results
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Number of results to skip
          default: 0
          title: Offset
        description: Number of results to skip
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - enum:
            - active
            - expired
            type: string
          - type: 'null'
          description: 'Filter by status: ''active'', ''expired'', or omit for all'
          title: Status
        description: 'Filter by status: ''active'', ''expired'', or omit for all'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterprisePilotsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/enterprises:
    get:
      tags:
      - Internal
      summary: Search Enterprises
      description: Search enterprises by name or ID (internal admin only).
      operationId: search_enterprises
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: search
        in: query
        required: true
        schema:
          type: string
          minLength: 2
          description: Search term for enterprise name or ID
          title: Search
        description: Search term for enterprise name or ID
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Maximum number of results
          default: 50
          title: Limit
        description: Maximum number of results
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Number of results to skip
          default: 0
          title: Offset
        description: Number of results to skip
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllEnterprisesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/enterprises/{enterprise_id}/members:
    get:
      tags:
      - Internal
      summary: Get Enterprise Members
      description: Get members of an enterprise with pagination, search, and sort (internal admin only).
      operationId: get_enterprise_members
      security:
      - ApiKeyHeaderPatched: []
      parameters:
      - name: enterprise_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Enterprise Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 500
          minimum: 1
          description: Maximum number of members to return
          default: 100
          title: Limit
        description: Maximum number of members to return
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Number of members to skip
          default: 0
          title: Offset
        description: Number of members to skip
      - name: search
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            maxLength: 200
          - type: 'null'
          description: Case-insensitive search across name and email
          title: Search
        description: Case-insensitive search across name and email
      - name: sort_by
        in: query
        required: false
        schema:
          enum:
          - name
          - email
          - joinedAt
          - role
          type: string
          default: name
          title: Sort By
      - name: sort_dir
        in: query
        required: false
        schema:
          enum:
          - asc
          - desc
          type: string
          default: asc
          title: Sort Dir
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseMembersResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Internal
      summary: Add Users To Enterprise
      description: "Add user(s) to an enterprise (internal admin only).\n\n- If a user is not in any enterprise: onboards them to the enterprise\n- If a user is already in this enterprise: skips them (included in skipped_count)\n- If a user is in a different enterprise: marks as failed\n- If a user is not found and create_missing_users is False: marks as failed\n- If a user is not found an

# --- truncated at 32 KB (170 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/wispr-ai/refs/heads/main/openapi/wispr-ai-internal-api-openapi.yml