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

# Create an upload session

> **Deprecated — this endpoint will be removed in a future release. Use `POST /api/v3/files` instead, which automatically creates an upload session.**

Create a new upload session



## OpenAPI

````yaml /api-reference/openapi-v2.yaml post /api/v2/upload-session
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v2)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://api.lighton.ai
security: []
tags:
  - name: Files Search
    description: Operations about files search
  - name: Models
    description: Operations about AI models
  - name: Files
    description: Operations about files
  - name: Workspaces
    description: Operations about workspaces
  - name: Upload Sessions
    description: Operations about upload sessions
  - name: Users
    description: Operations about users
  - name: Companies
    description: Operations about companies
  - name: SCIM
    description: Operations about SCIM
  - name: Feedbacks
    description: Operations about feedbacks
  - name: Reporting
    description: Operations about reporting
  - name: Platform Status
    description: Operations about platform status
paths:
  /api/v2/upload-session:
    post:
      tags:
        - Upload Sessions
      summary: Create an upload session
      description: >-
        **Deprecated — this endpoint will be removed in a future release. Use
        `POST /api/v3/files` instead, which automatically creates an upload
        session.**


        Create a new upload session
      operationId: api_v2_upload_session_create
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadSessionResponse'
          description: ''
      deprecated: true
      security:
        - bearerAuth: []
components:
  schemas:
    UploadSessionResponse:
      type: object
      description: Response serializer for upload session details.
      properties:
        uuid:
          type: string
          format: uuid
          description: Unique identifier for the upload session
        is_valid:
          type: boolean
          description: Whether the upload session is currently valid and active
        created_at:
          type: string
          format: date-time
          description: Timestamp when the upload session was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the upload session was last updated
        documents:
          type: array
          items:
            $ref: '#/components/schemas/UploadSessionDocument'
          description: List of documents associated with this upload session
      required:
        - created_at
        - documents
        - is_valid
        - updated_at
        - uuid
    UploadSessionDocument:
      type: object
      description: Serializer for documents within upload session responses.
      properties:
        id:
          type: integer
          readOnly: true
        title:
          type:
            - string
            - 'null'
          maxLength: 255
        collection:
          type:
            - integer
            - 'null'
        status:
          $ref: '#/components/schemas/DocumentStatusEnum'
        updated_at:
          type: string
          format: date-time
          readOnly: true
        workspace:
          type:
            - string
            - 'null'
          readOnly: true
          description: Workspace information associated with the document
      required:
        - id
        - updated_at
        - workspace
    DocumentStatusEnum:
      enum:
        - pending
        - pending_conversion
        - converting
        - parsing
        - parsing_failed
        - embedding
        - embedding_failed
        - embedded
        - parsed
        - fail
        - updating
      type: string
      description: |-
        * `pending` - Pending
        * `pending_conversion` - Pending Conversion
        * `converting` - Converting
        * `parsing` - Parsing
        * `parsing_failed` - Parsing Failed
        * `embedding` - Embedding
        * `embedding_failed` - Embedding Failed
        * `embedded` - Embedded
        * `parsed` - Parsed
        * `fail` - Fail
        * `updating` - Updating
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````