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

# Get user's chat logs



## OpenAPI

````yaml /api-reference/openapi.json get /user/chatlogs
openapi: 3.0.3
info:
  title: Findable API
  version: 3.2.38
  description: >
    REST API for the Findable AI Assistant platform.


    ## Authentication


    All endpoints (except `/server/setup` and `/server/bootstrap`) require a
    valid **Azure AD / Entra ID Bearer token**.


    ### Obtaining a token


    1. Register (or reuse) an **App Registration** in Azure Entra ID for your
    client.

    2. Under **API Permissions**, add a delegated permission for the Findable
    server app:
       `api://<SERVER_CLIENT_ID>/User.Read`
    3. Acquire a token using MSAL (or any OAuth 2.0 library) with the following
    parameters:


    | Parameter | Value |

    |-----------|-------|

    | Authority | `https://login.microsoftonline.com/<TENANT_ID>` |

    | Client ID | Your client app registration ID |

    | Scope | `api://<SERVER_CLIENT_ID>/User.Read` |

    | Grant type | Authorization Code (interactive) or Client Credentials
    (daemon) |


    ### Example (MSAL Node.js)


    ```javascript

    const { ConfidentialClientApplication } = require("@azure/msal-node");


    const cca = new ConfidentialClientApplication({
      auth: {
        clientId: "<YOUR_CLIENT_ID>",
        authority: "https://login.microsoftonline.com/<TENANT_ID>",
        clientSecret: "<YOUR_CLIENT_SECRET>",
      },
    });


    const result = await cca.acquireTokenByClientCredential({
      scopes: ["api://<SERVER_CLIENT_ID>/.default"],
    });


    // Use result.accessToken in the Authorization header

    ```


    ### Using the token


    Include the token in every request:

    ```

    Authorization: Bearer <access_token>

    ```


    ### Roles


    Access is determined by Azure AD group membership configured in the
    application settings:

    - **Admin (Owner)**: Full access to all endpoints including admin operations

    - **Contributor**: Can create and manage chats, files, and content

    - **User**: Read access to entitled chats and resources
  contact:
    name: Findable Support
  license:
    name: Proprietary
servers:
  - url: /server
    description: Application server (relative)
security:
  - BearerAuth: []
tags:
  - name: AI
    description: Chat completion and AI generation endpoints
  - name: Chats
    description: Chat configuration CRUD with ACL enforcement
  - name: Settings
    description: Application settings and health
  - name: Files
    description: Blob storage file operations
  - name: Search
    description: Azure AI Search resource management
  - name: User
    description: User profile, feedback, chat logs, and preferences
  - name: Flows
    description: FlowEngine flow designer operations
  - name: Prompts
    description: Prompt template management
  - name: Pages
    description: Navigation page management
  - name: Admin
    description: Administrative operations (admin-only)
  - name: Bootstrap
    description: Bootstrap seed data operations (admin-only)
  - name: Setup
    description: Initial application setup (pre-auth)
  - name: Cosmos
    description: Generic Cosmos DB CRUD operations
  - name: Tools
    description: Tool providers, web search, and utility tools
  - name: MCP
    description: Model Context Protocol server management
  - name: Telemetry
    description: Version, health, and API permission checks
  - name: SharePoint
    description: SharePoint entitlement management
  - name: Data Platform
    description: Data platform connection management
  - name: Vector Stores
    description: Vector store provider operations
  - name: OneDrive
    description: OneDrive personal file storage operations
  - name: Jobs
    description: Background job and scheduler management
  - name: Memory
    description: User and organizational memory operations
  - name: Slack
    description: >-
      Slack bot interactions and webhooks (public, uses Slack signature
      verification)
  - name: Teams
    description: Microsoft Teams bot webhooks and interactions
  - name: Human Input
    description: Human-in-the-loop input requests for flow executions
  - name: Datasources
    description: Datasource catalog CRUD with ACL enforcement
  - name: Assignments
    description: >-
      Assignment lifecycle: inbox, sent, create, launch, complete, delegate,
      reject, reassign, remind, and recurring schedules. Experimental feature —
      requires experimental flag enabled.
paths:
  /user/chatlogs:
    get:
      tags:
        - User
      summary: Get user's chat logs
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            default: 1
          description: Page number
        - in: query
          name: pageSize
          schema:
            type: integer
            default: 20
          description: Items per page
        - in: query
          name: startDate
          schema:
            type: string
          description: Filter by start date
        - in: query
          name: endDate
          schema:
            type: string
          description: Filter by end date
        - in: query
          name: chatId
          schema:
            type: string
          description: Filter by chat ID
        - in: query
          name: dataSourceType
          schema:
            type: string
          description: Filter by data source type
        - in: query
          name: keyword
          schema:
            type: string
          description: Full-text search keyword
        - in: query
          name: summariesOnly
          schema:
            default: false
            type: boolean
          description: >
            Lightweight boot-prefetch mode. Returns projected summaries only:
            `data` is empty, `filterOptions` is null, and chat logs are queried
            without their chatHistory payload. Full logs are fetched per-log via
            GET /user/chatlogs/{id}.
      responses:
        '200':
          description: >-
            Paginated chat logs (full documents in `data` plus `summaries`;
            `data` is empty when summariesOnly=true)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatLogsResponse'
components:
  schemas:
    ChatLogsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Chat log ID (UUID)
              email:
                type: string
                description: >-
                  Owner's email / UPN (Cosmos partition key). Always set
                  server-side from the authenticated user.
              chatHistory:
                type: array
                items:
                  type: object
                  properties:
                    role:
                      type: string
                      enum:
                        - system
                        - user
                        - assistant
                      description: OpenAI-style message role
                    content:
                      type: string
                    citations:
                      description: Citation references attached to an assistant message
                      nullable: true
                      type: array
                      items:
                        type: string
                    timestamp:
                      description: Unix timestamp in milliseconds
                      type: integer
                    messageType:
                      description: 'Rich message kind (default: message)'
                      type: string
                      enum:
                        - message
                        - human_input_prompt
                        - prompt_response
                        - inline_buttons
                        - message_notification
                        - sources_unavailable
                    humanInputData:
                      description: >-
                        Human-input request payload (when messageType ===
                        human_input_prompt)
                      type: object
                      additionalProperties: {}
                    promptResponseData:
                      description: >-
                        Submitted prompt response (when messageType ===
                        prompt_response)
                      type: object
                      additionalProperties: {}
                    toolActivities:
                      description: Tool call activity persisted by the flow engine
                      type: array
                      items:
                        type: object
                        additionalProperties: {}
                    thinkingText:
                      description: Model reasoning text captured during generation
                      type: string
                    scopedChatData:
                      description: Scoped-chat context payload
                      type: object
                      additionalProperties: {}
                    inlineButtonsData:
                      description: >-
                        Inline button definitions (when messageType ===
                        inline_buttons)
                      type: object
                      additionalProperties: {}
                    messageNotificationData:
                      description: >-
                        Notification payload (when messageType ===
                        message_notification)
                      type: object
                      additionalProperties: {}
                    workflowInvitationData:
                      description: Workflow invitation card data
                      type: object
                      properties:
                        title:
                          type: string
                        description:
                          type: string
                        started:
                          type: boolean
                      required:
                        - title
                      additionalProperties: false
                    entryPromptData:
                      description: Entry prompt form data for flow-variable collection
                      type: object
                      properties:
                        prompt:
                          description: Prompt template shown as the entry form
                        isReminder:
                          type: boolean
                        filledValues:
                          nullable: true
                          type: object
                          additionalProperties: {}
                      additionalProperties: false
                  required:
                    - role
                    - content
                  additionalProperties: false
                  title: ChatLogMessage
                  description: A single persisted message within a chat log
                description: Ordered conversation messages
              title:
                description: >-
                  AI-generated title for the chat session (generated
                  asynchronously after create/update)
                type: string
              chatTitle:
                description: >-
                  Parent chat name (e.g. "My Workspace" for personal, chat tab
                  title for shared)
                type: string
              dataSourceName:
                type: string
                description: Display name of the data source at log-write time
              dataSourceType:
                type: string
                description: >-
                  DATASOURCE_TYPE at log-write time (shared, personal,
                  workspace, sharepoint, ...)
              dataSourceId:
                type: string
              chatId:
                type: string
                description: >-
                  Source chat ID — ephemeral workspace session ID for workspace
                  chats, persisted chat ID for shared chats
              isWorkspace:
                description: >-
                  True when produced by the ephemeral cross-chat workspace
                  session — authoritative chat-kind signal on rehydrate
                type: boolean
              aiOptions:
                type: object
                properties:
                  maxTokens:
                    type: integer
                  topP:
                    type: number
                  temperature:
                    type: number
                  topNDocuments:
                    type: integer
                  systemPrompt:
                    type: string
                  filter:
                    type: string
                additionalProperties: false
                title: ChatLogAIOptions
                description: AI inference options captured at log-write time
              hasHumanInput:
                description: True if any message is human_input_prompt or prompt_response
                type: boolean
              humanInputCount:
                description: Count of prompt_response messages
                type: integer
              promptIds:
                description: All promptTemplateIds referenced in this chat log
                type: array
                items:
                  type: string
              createdAt:
                description: ISO-8601 creation timestamp (set server-side)
                type: string
              updatedAt:
                description: ISO-8601 update timestamp (set server-side)
                type: string
              _ts:
                description: Cosmos DB last-modified timestamp (epoch seconds)
                type: integer
            required:
              - id
              - email
              - chatHistory
              - dataSourceName
              - dataSourceType
              - dataSourceId
              - chatId
              - aiOptions
            additionalProperties: false
            title: ChatLog
            description: >-
              A persisted chat session (conversation transcript + source/AI
              metadata)
          description: >-
            Full chat log documents for rehydration (empty when
            summariesOnly=true)
        summaries:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              chatId:
                type: string
              email:
                type: string
              title:
                type: string
                description: >-
                  AI-generated title, or first user message truncated to 100
                  chars
              chatTitle:
                description: Parent chat name (user endpoint only)
                type: string
              dataSourceId:
                type: string
              dataSourceType:
                type: string
              dataSourceName:
                description: Data source display name (admin endpoint only)
                type: string
              isWorkspace:
                type: boolean
                description: True for ephemeral cross-chat workspace sessions
              messageCount:
                type: integer
              timestamp:
                type: integer
                description: Cosmos _ts (epoch seconds)
              createdAt:
                type: string
                description: ISO-8601 creation timestamp derived from _ts
            required:
              - id
              - chatId
              - email
              - title
              - dataSourceId
              - dataSourceType
              - isWorkspace
              - messageCount
              - timestamp
              - createdAt
            additionalProperties: false
            title: ChatLogSummary
            description: Lightweight chat log summary for tables and sidebars
          description: Table-ready summaries for the same page of results
        pagination:
          type: object
          properties:
            currentPage:
              type: integer
            pageSize:
              type: integer
            totalCount:
              type: integer
            totalPages:
              type: integer
            hasNextPage:
              type: boolean
            hasPreviousPage:
              type: boolean
          required:
            - currentPage
            - pageSize
            - totalCount
            - totalPages
            - hasNextPage
            - hasPreviousPage
          additionalProperties: false
        filterOptions:
          nullable: true
          description: Dropdown filter options (null when summariesOnly=true)
          type: object
          properties:
            dataSourceTypes:
              type: array
              items:
                type: string
              description: Distinct data source types for dropdowns
            dataSourceNames:
              description: Distinct data source names (admin endpoint only)
              type: array
              items:
                type: string
            userEmails:
              description: Distinct user emails (admin endpoint only)
              type: array
              items:
                type: string
            chats:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  title:
                    type: string
                  dataSourceType:
                    type: string
                required:
                  - id
                  - title
                additionalProperties: false
              description: Available chats for filtering
          required:
            - dataSourceTypes
            - chats
          additionalProperties: false
      required:
        - data
        - summaries
        - pagination
        - filterOptions
      additionalProperties: false
      title: ChatLogsResponse
      description: >-
        Paginated chat log list response (full documents + summaries + filter
        options)
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Azure AD access token obtained via MSAL

````