---
title: "List comment threads"
method: GET
path: "/media/{mediaId}/comments"
tags: ["Comments"]
---

# List comment threads

`GET /media/{mediaId}/comments`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/media/{mediaId}/comments`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

Returns the media's comment threads, oldest first, with the media's current `transcriptRevision`. Each thread is its first comment with a `replies` array. Anyone who can open the file can read its comments; no comments permission is needed. The media must belong to your company and be one you can open. Owners and members with the folder **Access all** permission can open any file; everyone else can open files in folders assigned to them or their groups, and files they own. Any other media returns 404, the same as a media id that does not exist.

A deleted first comment that still has replies stays in the list with an empty `body` and `isDeleted: true`, so the replies keep their context. Deleted replies are left out.

When a transcript is saved, labels and comments on passages are moved to the new text in the background, after the save has answered. Until that finishes, which is normally a moment, a list can return anchors whose `anchor.transcriptRevision` is lower than the top-level `transcriptRevision`. Fetch the list again shortly after a save.

## Path parameters

- `mediaId` string, required

## Query parameters

- `filter` 'all' | 'open' | 'resolved' | 'file'

## Response `200`

Success

- object
  - `status` 'success': `success` on every 2xx response.
  - `data` object: The result.
    - `transcriptRevision` integer: The media's current transcript revision.
    - `threads` object[]: Threads, oldest first.
      - `commentId` string: Id of the comment.
      - `mediaId` string: Id of the media.
      - `anchor` object, nullable: The passage the comment is on, or `null` for a comment on the whole file. Replies carry `null`.
        - `startWord` integer: Position of the first word.
        - `endWord` integer: Position of the last word, inclusive.
        - `exact` string: The quoted words, joined by single spaces.
        - `prefix` string: Up to 32 characters of transcript text before the quote.
        - `suffix` string: Up to 32 characters of transcript text after the quote.
        - `startInSec` number: Start time of the first word, in seconds.
        - `endInSec` number: End time of the last word, in seconds.
        - `speakerIds` string[]: Speakers of the quoted words.
        - `transcriptRevision` integer: The transcript revision these positions refer to.
      - `parentId` string, nullable: `commentId` of the thread's first comment for a reply, `null` for the first comment.
      - `body` string: Comment text. Empty on a deleted first comment that still has replies.
      - `mediaLabelId` string: Labelled passage the comment is linked to. Present only when one was linked.
      - `status` 'active' | 'shifted' | 'needs_review': Present only on comments with an anchor. `active`: the same words, possibly at new positions after an edit. `shifted`: most of the words survived an edit near the same time, but the text changed. `needs_review`: the words changed too much to follow; `anchor` then holds a suggested passage on the new transcript and `lastResolved` the last position a person confirmed.
      - `lastResolved` object: Present only while `status` is `needs_review`: the last position a person confirmed.
        - `startWord` integer: Position of the first word.
        - `endWord` integer: Position of the last word, inclusive.
        - `exact` string: The quoted words, joined by single spaces.
        - `prefix` string: Up to 32 characters of transcript text before the quote.
        - `suffix` string: Up to 32 characters of transcript text after the quote.
        - `startInSec` number: Start time of the first word, in seconds.
        - `endInSec` number: End time of the last word, in seconds.
        - `speakerIds` string[]: Speakers of the quoted words.
        - `transcriptRevision` integer: The transcript revision these positions refer to.
      - `isResolved` boolean: `true` once the thread is resolved. Only set on the first comment of a thread.
      - `resolvedBy` string: Id of the person who resolved the thread. Present only while it is resolved.
      - `isDeleted` boolean: `true` on a deleted first comment kept because it has replies.
      - `userId` string: Id of the author.
      - `createdAt` string, date-time: When it was posted.
      - `updatedAt` string, date-time: When it last changed.
      - `replies` object[]: Replies, oldest first, with the same fields. Deleted replies are left out.
        - `commentId` string: Id of the comment.
        - `mediaId` string: Id of the media.
        - `anchor` object, nullable: The passage the comment is on, or `null` for a comment on the whole file. Replies carry `null`.
          - `startWord` integer: Position of the first word.
          - `endWord` integer: Position of the last word, inclusive.
          - `exact` string: The quoted words, joined by single spaces.
          - `prefix` string: Up to 32 characters of transcript text before the quote.
          - `suffix` string: Up to 32 characters of transcript text after the quote.
          - `startInSec` number: Start time of the first word, in seconds.
          - `endInSec` number: End time of the last word, in seconds.
          - `speakerIds` string[]: Speakers of the quoted words.
          - `transcriptRevision` integer: The transcript revision these positions refer to.
        - `parentId` string, nullable: `commentId` of the thread's first comment for a reply, `null` for the first comment.
        - `body` string: Comment text. Empty on a deleted first comment that still has replies.
        - `mediaLabelId` string: Labelled passage the comment is linked to. Present only when one was linked.
        - `status` 'active' | 'shifted' | 'needs_review': Present only on comments with an anchor. `active`: the same words, possibly at new positions after an edit. `shifted`: most of the words survived an edit near the same time, but the text changed. `needs_review`: the words changed too much to follow; `anchor` then holds a suggested passage on the new transcript and `lastResolved` the last position a person confirmed.
        - `lastResolved` object: Present only while `status` is `needs_review`: the last position a person confirmed.
          - `startWord` integer: Position of the first word.
          - `endWord` integer: Position of the last word, inclusive.
          - `exact` string: The quoted words, joined by single spaces.
          - `prefix` string: Up to 32 characters of transcript text before the quote.
          - `suffix` string: Up to 32 characters of transcript text after the quote.
          - `startInSec` number: Start time of the first word, in seconds.
          - `endInSec` number: End time of the last word, in seconds.
          - `speakerIds` string[]: Speakers of the quoted words.
          - `transcriptRevision` integer: The transcript revision these positions refer to.
        - `isResolved` boolean: `true` once the thread is resolved. Only set on the first comment of a thread.
        - `resolvedBy` string: Id of the person who resolved the thread. Present only while it is resolved.
        - `isDeleted` boolean: `true` on a deleted first comment kept because it has replies.
        - `userId` string: Id of the author.
        - `createdAt` string, date-time: When it was posted.
        - `updatedAt` string, date-time: When it last changed.

## Other responses

- `400`: A path or query value failed validation
- `404`: The media does not exist or you cannot open it

---

[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)
