---
title: "Get Embed Session"
method: GET
path: "/embed/sessions/{embedId}/detail/{id}"
tags: ["Media Embed"]
---

# Get Embed Session

`GET /embed/sessions/{embedId}/detail/{id}`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/embed/sessions/{embedId}/detail/{id}`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

Read one viewing session in full: the same fields as the session list, plus each media file opened, each question asked to the AI chat, and a page of the session's events in time order. Use `eventsPage` and `eventsPageSize` to walk through long sessions.

Returns 404 when the session does not belong to this embed. Members without access to all folders only see embeds for media and folders they can open. Any other embed, or an embed that is deleted or in another workspace, returns 404.

## Path parameters

- `embedId` string, required
- `id` string, required

## Query parameters

- `eventsPage` integer
- `eventsPageSize` integer

## Response `200`

OK

- object
  - `status` 'success'
  - `data` object
    - `session` object
      - `_id` string: The session's id. Use it with the session detail endpoint.
      - `sessionId` string: The id the browser gave the session.
      - `isLegacy` boolean: True for a visit recorded before session tracking. Its timing, media and question numbers are null.
      - `isOwner` boolean: True when the visit came from a member of your workspace.
      - `isLive` boolean: True when the viewer was active in the last minute and the session has not ended.
      - `visitorId` string: Anonymous id kept in the viewer's browser. Absent on some legacy visits.
      - `viewerId` string: Present when the viewer entered their email on the embed.
      - `email` string: The email the viewer entered, when they did.
      - `name` string: The name the viewer entered, when they did.
      - `startedAt` string, date-time
      - `lastActiveAt` string, date-time: Last time the viewer interacted. Absent when unknown.
      - `endedAt` string, date-time: When the session ended. Absent while it is still open. A session with no activity for 30 minutes counts as ended at its last activity.
      - `durationMs` integer, nullable: Wall clock time from start to last activity, in milliseconds. Null on legacy visits.
      - `activeMs` integer, nullable: Time the viewer was active on the page, in milliseconds. Null on legacy visits.
      - `mediaOpened` integer, nullable: Media files opened. Null on legacy visits.
      - `watchedMs` integer, nullable: Media playback time, in milliseconds. Null on legacy visits.
      - `questions` integer, nullable: Questions asked to the AI chat. Null on legacy visits.
      - `client` object: Where the visit came from and on what device, when known. Every field is optional.
        - `country` string: Country name.
        - `region` string
        - `city` string
        - `continent` string
        - `timeZone` string
        - `browser` string
        - `os` string
        - `referer` string
        - `referrerHost` string: Host of the referring page.
        - `screen` string
        - `language` string
        - `embedded` boolean: True when the embed was loaded inside another site's page.
        - `deviceType` string: The device type the browser reports, such as `mobile` or `tablet`. Usually absent on desktop browsers.
      - `campaign` object: UTM tags on the visit, when present. Every field is optional.
        - `utmSource` string
        - `utmMedium` string
        - `utmCampaign` string
      - `media` object[]: Each media file opened in the session.
        - `mediaId` string
        - `opens` integer
        - `activeMs` integer: Time the viewer was active while this file was open, in milliseconds.
        - `playedMs` integer: Playback time, in milliseconds.
        - `plays` integer
        - `seeks` integer
        - `maxPositionPct` integer: Furthest point reached, as a percentage of the file.
        - `completed` boolean: True when the viewer reached 95% of the file.
        - `firstOpenedAt` string, date-time
        - `name` string: Absent when the media file no longer exists.
        - `durationSec` integer: Absent when unknown.
      - `chat` object[]: Each question asked to the AI chat in the session.
        - `promptId` string
        - `messageId` string
        - `askedAt` string, date-time
        - `mediaIds` string[]
        - `question` string: The question text. Absent when the chat message no longer exists.
        - `state` string: State of the answer. Absent when the chat message no longer exists.
        - `feedbackScore` integer: The viewer's rating of the answer, when they gave one.
      - `events` object[]: One page of the session's events, oldest first.
        - `t` integer: When the event happened in the browser, in milliseconds since the Unix epoch.
        - `type` 'session_start' | 'session_resume' | 'session_end' | 'page_view' | 'dashboard_view' | 'widget_open' | 'media_open' | 'media_close' | 'citation_open' | 'search' | 'transcript_download' | 'transcript_copy' | 'media_download' | 'export' | 'play' | 'pause' | 'seek' | 'ended' | 'rate_change' | 'chat_question' | 'chat_feedback' | 'hidden' | 'idle' | 'gate_shown' | 'lead_captured'
        - `category` 'lifecycle' | 'navigation' | 'playback' | 'chat' | 'engagement' | 'identity' | 'sharing'
        - `mediaId` string: Present on events about a media file.
        - `data` object: Extra details for the event, such as the playback position or export format. Keys vary by event type.
          - `source` string
        - `receivedAt` string, date-time: When the server received the event.
        - `promptId` string: Present on events about an AI chat question.
      - `eventsPage` integer: The events page returned, starting at 0.
      - `eventsPageSize` integer: The events page size used.
      - `eventsTotal` integer: Events in the session, across all pages.
      - `bot` object: Present when the visit was a detected bot or crawler.
        - `kind` 'render' | 'crawler'
        - `name` string
    - `visitorSessions` integer: Sessions on this embed from the same viewer, or from the same browser when the viewer is anonymous, including this one.

## Other responses

- `400`: A query parameter failed validation
- `404`: Embed or session not found

## Changes

- **2026-10-19** `52d777e6d46e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/speakai/apis/speak-ai-api/changes/embed/sessions/:embedId/detail/:id/get.md)

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
