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

# Ask AI Logs

> Raw, paginated Ask AI conversation log rows — the same data the internal Logs → Ask AI dashboard table serves. Use this for record-level inspection; use Ask AI Analytics for aggregate reporting. Results are sorted newest-first by `timestamp`.

<Info>
  Data is sourced from BigQuery — expect a **5–15 minute lag** for the most recent events. All dates and timestamps are **UTC**. Responses are tenant-scoped to the API key and are rate limited (default **60 requests/minute** per key; `X-RateLimit-*` headers are returned, `429` with `Retry-After` when exceeded) and cached server-side for up to **30 minutes** (send `Cache-Control: no-cache` to skip the cache read; the `X-Cache` response header reports `HIT`, `MISS`, `BYPASS`, or `DISABLED`).
</Info>

<Note>
  This is a record-level endpoint for inspecting individual conversations. For aggregate KPIs and time-series use [Ask AI Analytics](/api-reference/endpoint/ask-ai-analytics) instead.
</Note>

<Warning>
  If either `start_date` or `end_date` is omitted, **both** default to the trailing 7-day window ending today UTC. `page` must be **≥ 1**; `limit` defaults to **50** and is clamped to a hard max of **500** (larger values are silently reduced). When `interaction_type` is omitted the service defaults to `free_form`, `automated_followup`, and `search`.
</Warning>


## OpenAPI

````yaml get /v1/analytics/ask-ai/logs
openapi: 3.1.0
info:
  title: Dappier Datamodel API
  version: 0.1.0
servers:
  - url: https://api.dappier.com
security: []
paths:
  /v1/analytics/ask-ai/logs:
    get:
      summary: Get Ask AI Logs
      description: >-
        Raw, paginated Ask AI conversation log rows — the same data the internal
        Logs → Ask AI dashboard table serves. Use this for record-level
        inspection; use Ask AI Analytics for aggregate reporting. Results are
        sorted newest-first by `timestamp`.
      operationId: get_AskAi_logs
      parameters:
        - name: start_date
          in: query
          required: false
          description: >-
            Inclusive start of the analytics window, formatted `YYYY-MM-DD`
            (UTC). Optional — if either `start_date` or `end_date` is omitted,
            both default to the trailing **7-day window** ending `today_UTC`
            (i.e., `start_date = today_UTC - 6`).
          schema:
            type: string
            format: date
            example: '2026-05-01'
        - name: end_date
          in: query
          required: false
          description: >-
            Inclusive end of the analytics window, formatted `YYYY-MM-DD` (UTC).
            Optional — if either `start_date` or `end_date` is omitted, both
            default to the trailing **7-day window** ending `today_UTC`. Must be
            on or after `start_date`; the total range must be ≤ **365 days**.
          schema:
            type: string
            format: date
            example: '2026-05-18'
        - name: widget_id
          in: query
          required: false
          description: Filter to one widget. Omit for all widgets the account owns.
          schema:
            type: string
            example: wd_92831
        - name: placement_id
          in: query
          required: false
          description: Filter to one placement.
          schema:
            type: string
        - name: deployment_type
          in: query
          required: false
          description: Filter by deployment type (exact match).
          schema:
            type: string
            example: brand_agent
        - name: interaction_type
          in: query
          required: false
          description: >-
            Single value. When omitted, the service defaults to `free_form`,
            `automated_followup`, and `search`.
          schema:
            type: string
            example: free_form
        - name: page
          in: query
          required: false
          description: 1-based page number. Must be ≥ 1.
          schema:
            type: integer
            default: 1
            minimum: 1
            example: 1
        - name: limit
          in: query
          required: false
          description: Page size. Hard max 500 — larger values are clamped down.
          schema:
            type: integer
            default: 50
            maximum: 500
            example: 100
      responses:
        '200':
          description: A page of conversation log rows, newest-first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskAiLogsResponse'
        '400':
          description: '`page` not a positive integer, or `limit` not a positive integer.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsError'
        '401':
          description: '`Authorization` header missing, or token does not start with `ak_`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsError'
        '403':
          description: API key not found, or key is inactive.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsError'
        '429':
          description: Rate limit exceeded. A `Retry-After` header (seconds) is returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: rate limit exceeded
        '500':
          description: Internal or BigQuery failure (empty body).
      security:
        - ApiKeyBearer: []
components:
  schemas:
    AskAiLogsResponse:
      type: object
      title: AskAiLogsResponse
      properties:
        data:
          type: array
          description: Conversation log rows, newest-first by `timestamp`.
          items:
            type: object
            properties:
              timestamp:
                type: string
                format: date-time
                description: Event time (UTC).
                example: '2026-05-18T09:14:22Z'
              widget_id:
                type: string
                description: Literal BigQuery column value.
                example: wd_92831
              placement_id:
                type: string
                description: Literal BigQuery column value.
                example: pl_abc
              deployment_type:
                type: string
                description: Literal BigQuery column value.
                example: brand_agent
              ai_agent:
                type: string
                description: >-
                  AI model display name (falls back to the raw model id if the
                  name can't be resolved).
                example: Acme Support Agent
              referring_url:
                type: string
                description: Page the widget was loaded on.
                example: https://example.com/pricing
              interaction_type:
                type: string
                description: e.g. `free_form`, `automated_followup`, `search`.
                example: free_form
              prompt:
                type: string
                description: Full user prompt (not truncated).
                example: Do you offer annual billing?
              response:
                type: string
                description: Full AI response (not truncated).
                example: Yes — annual plans include a 20% discount...
        total_pages:
          type: integer
          description: Total pages for the current `limit`.
          example: 12
        count:
          type: integer
          description: Total matching rows across all pages.
          example: 573
        meta:
          type: object
          properties:
            timezone:
              type: string
              example: UTC
            generated_at:
              type: string
              format: date-time
              example: '2026-05-18T09:20:00Z'
    AnalyticsError:
      type: object
      title: AnalyticsError
      properties:
        message:
          type: string
          description: Human-readable error description.
          example: end_date must be on or after start_date
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      description: >-
        Bearer token authentication using your Dappier API key. Get your API key
        at https://platform.dappier.com/profile/api-keys.

````