> ## Documentation Index
> Fetch the complete documentation index at: https://demandiq-mintlify-sync-api-docs-1775595360.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Initiate document upload

> Validates the file and returns a presigned S3 URL for direct upload. Call `/api/company/kb/documents/complete` after the upload finishes.



## OpenAPI

````yaml /sales-copilot/openapi.json post /api/company/kb/documents/upload-init
openapi: 3.0.0
info:
  title: Sales CoPilot API
  version: 1.0.0
  description: >-
    REST API for Sales CoPilot — an AI-powered presentation platform with
    narrated slides, live Q&A, and deck management.


    **Authentication**: Most endpoints require a session cookie obtained from
    `POST /api/auth/login`. Presentation playback endpoints (`/api/qa`,
    `/api/narration/*`) also accept a `presentationId` for unauthenticated
    viewer access.
  contact:
    name: Demand IQ
    url: https://demand-iq.com
servers:
  - url: https://app.demand-iq.com
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: Decks
    description: Manage presentation decks
  - name: Slides
    description: Manage slides within a deck
  - name: FAQs
    description: Manage pre-built Q&A pairs
  - name: Branding
    description: Colors, logo, and call-to-action configuration
  - name: Q&A
    description: Live question answering and Q&A settings
  - name: Narration
    description: Text-to-speech synthesis
  - name: Presentations
    description: Create and manage personalized presentation instances
  - name: Generation
    description: AI-powered content generation from slide images
  - name: Images
    description: Image upload and management
  - name: Voices
    description: Available TTS voices
  - name: Utility
    description: Health check and diagnostics
  - name: Authentication
    description: Session-based login, logout, and identity
  - name: Company
    description: Organization contact info and knowledge base
  - name: Notifications
    description: Event subscriptions and delivery log
  - name: Contracts
    description: Contract template import and e-signature
  - name: Fonts
    description: Available Google Fonts for branding
  - name: Appointments
    description: Prospect appointment scheduling during presentations
  - name: Roof Measurements
    description: Automated roof measurement requests via Demand IQ
  - name: Viewer
    description: Presentation viewer data and interaction classification
paths:
  /api/company/kb/documents/upload-init:
    post:
      tags:
        - Company
      summary: Initiate document upload
      description: >-
        Validates the file and returns a presigned S3 URL for direct upload.
        Call `/api/company/kb/documents/complete` after the upload finishes.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - filename
                - contentType
                - sizeBytes
              properties:
                filename:
                  type: string
                  example: product-guide.pdf
                contentType:
                  type: string
                  example: application/pdf
                sizeBytes:
                  type: integer
                  example: 1048576
                displayName:
                  type: string
      responses:
        '200':
          description: Upload initiated
          content:
            application/json:
              schema:
                type: object
                properties:
                  documentId:
                    type: string
                    format: uuid
                  uploadUrl:
                    type: string
                    format: uri
                    description: Presigned S3 URL for PUT upload
                  storageKey:
                    type: string
                  expiresIn:
                    type: integer
                    description: URL expiry in seconds
        '400':
          description: Bad request (invalid file type, size, or document limit reached)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - sessionCookie: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: session
      description: Session cookie obtained from `POST /api/auth/login`.

````