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

# Record a presentation event

> Ingests interaction events from the presentation viewer (opens, slide views, CTA clicks). Authenticated via an HMAC token in the request body. Every slide exit is recorded: `slide_viewed` accepts an optional `skipped` flag for views under the 2-second skip threshold, and `slide_viewed_batch` submits up to 25 slide views in one request. Each view in a batch counts against the rate limit individually, so batching reduces requests without raising the effective write cap. The `action_detection` and `action_execution` types, and untyped Q&A interaction bodies, are acknowledged with `200` for backward compatibility but are no longer stored.



## OpenAPI

````yaml /openapi.json post /api/presentations/{presentationId}/events
openapi: 3.0.0
info:
  title: AI Presentations API
  version: 1.0.0
  description: >-
    REST API for AI Presentations — 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: Roof Measurements
    description: Request and track automated roof measurements
  - name: Actions
    description: Voice/text command detection for presentation control
  - name: Appointments
    description: Appointment scheduling for presentation viewers
  - name: Activity
    description: Recent presentation activity feed
  - name: Onboarding
    description: >-
      Per-user product onboarding milestones (ENG-641). Milestone endpoints are
      idempotent and are called by the app UI — they should not be treated as
      tenant-integration surface.
paths:
  /api/presentations/{presentationId}/events:
    post:
      tags:
        - Presentations
      summary: Record a presentation event
      description: >-
        Ingests interaction events from the presentation viewer (opens, slide
        views, CTA clicks). Authenticated via an HMAC token in the request body.
        Every slide exit is recorded: `slide_viewed` accepts an optional
        `skipped` flag for views under the 2-second skip threshold, and
        `slide_viewed_batch` submits up to 25 slide views in one request. Each
        view in a batch counts against the rate limit individually, so batching
        reduces requests without raising the effective write cap. The
        `action_detection` and `action_execution` types, and untyped Q&A
        interaction bodies, are acknowledged with `200` for backward
        compatibility but are no longer stored.
      parameters:
        - in: path
          name: presentationId
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - _token
                - type
              properties:
                _token:
                  type: string
                  description: HMAC authentication token
                type:
                  type: string
                  enum:
                    - presentation_opened
                    - slide_viewed
                    - slide_viewed_batch
                    - cta_clicked
                    - action_detection
                    - action_execution
                  description: >-
                    Event type. `action_detection` and `action_execution` are
                    deprecated: they are acknowledged but not stored.
                slideId:
                  type: string
                slideIndex:
                  type: integer
                durationMs:
                  type: integer
                skipped:
                  type: boolean
                  description: >-
                    Whether the viewer left the slide in under 2 seconds. A
                    flag, not a filter: fast flips are still recorded as
                    `slide_viewed` events.
                views:
                  type: array
                  maxItems: 25
                  description: >-
                    Slide views to record in one request. Required when `type`
                    is `slide_viewed_batch`. Each view counts against the rate
                    limit individually.
                  items:
                    type: object
                    required:
                      - slideId
                      - slideIndex
                    properties:
                      slideId:
                        type: string
                      slideIndex:
                        type: integer
                      durationMs:
                        type: integer
                      skipped:
                        type: boolean
                ctaType:
                  type: string
                ctaLabel:
                  type: string
                ctaUrl:
                  type: string
                  description: >-
                    Destination URL of an `external_link` CTA. Send it only on
                    `cta_clicked` events for that CTA type.
      responses:
        '200':
          description: Event recorded
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error

````