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

# Export threads

> Export all threads and their messages for the organization within a date range. Returns data as JSON without pagination.



## OpenAPI

````yaml https://api.camelai.com/api/schema/ post /api/v1/threads/export
openapi: 3.0.3
info:
  title: camelAI API
  version: 1.0.0 (v1)
  description: API for camelAI - AI-powered data analytics platform
servers:
  - url: https://api.camelai.com
    description: camelAI API server
security: []
paths:
  /api/v1/threads/export:
    post:
      tags:
        - threads
      summary: Export threads
      description: >-
        Export all threads and their messages for the organization within a date
        range. Returns data as JSON without pagination.
      operationId: threads_export_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThreadExportRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadExportResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadExportBadRequest'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadExportError'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ThreadExportRequest:
      type: object
      description: Serializer for thread export request.
      properties:
        start_date:
          type: string
          format: date
          description: Start date for export range (YYYY-MM-DD)
        end_date:
          type: string
          format: date
          description: End date for export range (YYYY-MM-DD)
      required:
        - end_date
        - start_date
    ThreadExportResponse:
      type: object
      properties:
        export_metadata:
          type: object
          additionalProperties: {}
          description: Metadata about the export
        threads:
          type: array
          items: {}
          description: List of threads with messages
      required:
        - export_metadata
        - threads
    ThreadExportBadRequest:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
    ThreadExportError:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: API key authentication using Bearer scheme

````