---
title: "Update Comment"
method: PUT
path: "/comments/{comment_id}"
tags: ["Comments"]
---

# Update Comment

`PUT /comments/{comment_id}`

## Request

- Base URL: `https://api.aspect.inc`
- URL: `https://api.aspect.inc/comments/{comment_id}`
- Auth: API key in header `Authorization`

Update comment text (only comment author can update)

## Path parameters

- `comment_id` string, uuid, required: The ID of the comment to update

## Request body

- CommentUpdateRequest: API request schema for updating a comment
  - `text` string, required: Updated comment text
  - `mentions` MentionCreateData[]: User mentions in the comment
    - `user_id` string, uuid, required: User being mentioned
    - `text` string, required: Mention text (e.g., '@John Doe')
    - `start_index` integer, required: Start position in comment text
    - `end_index` integer, required: End position in comment text (non-inclusive)
  - `attachment_ids` string[]: Attachment IDs to link to the comment (replaces existing)
  - `timestamp` number, nullable: Video timestamp in seconds. Send a negative number to remove it.
  - `duration` number, nullable: Duration in seconds for range comments. Send a negative number to remove it.
  - `private` boolean, nullable: Hidden from share-link guests. Only for root comments.

## Response `200`

Successful Response

- CommentResponse: API response schema for a single comment with nested replies, reactions, mentions, and attachments
  - `id` string, uuid, required: Comment ID
  - `resource_id` string, uuid, required: Asset the comment is on
  - `parent_id` string, uuid, nullable, required: Parent comment ID. Null for top-level comments.
  - `text` string, required: Comment text
  - `timestamp` number, nullable, required: Video timestamp in seconds
  - `duration` number, nullable, required: Duration in seconds for range comments
  - `anchor_position` AnchorPosition: A point on the frame, image, or page, in percent of its size.
    - `x` number, required: Distance from the left edge, from 0 to 100
    - `y` number, required: Distance from the top edge, from 0 to 100
  - `annotation` union[], nullable: Shapes drawn on the frame, image, or page
    - union
      - PenPath: A freehand stroke.
        - `tool` 'pen', required
        - `color` string, required: Hex color, such as `#22C55E`
        - `stroke_width` number, required: Line width in screen pixels
        - `points` union, required: Points along the stroke: a list of points, or the same points as two lists
          - AnnotationPoint[]
            - `x` number, required: Distance from the left edge, from 0 to 1
            - `y` number, required: Distance from the top edge, from 0 to 1
          - CompactPoints: Pen points as two lists: point n is (`x[n]`, `y[n]`), each from 0 to 1.
            - `x` number[], required: Distances from the left edge
            - `y` number[], required: Distances from the top edge
      - LinePath: A straight line from `start` to `end`.
        - `tool` 'line', required
        - `color` string, required: Hex color, such as `#22C55E`
        - `stroke_width` number, required: Line width in screen pixels
        - `start` AnnotationPoint, required: A point on the frame, image, or page, as a fraction of its size.
          - `x` number, required: Distance from the left edge, from 0 to 1
          - `y` number, required: Distance from the top edge, from 0 to 1
        - `end` AnnotationPoint, required: A point on the frame, image, or page, as a fraction of its size.
          - `x` number, required: Distance from the left edge, from 0 to 1
          - `y` number, required: Distance from the top edge, from 0 to 1
      - ArrowPath: An arrow pointing from `start` to `end`.
        - `tool` 'arrow', required
        - `color` string, required: Hex color, such as `#22C55E`
        - `stroke_width` number, required: Line width in screen pixels
        - `start` AnnotationPoint, required: A point on the frame, image, or page, as a fraction of its size.
          - `x` number, required: Distance from the left edge, from 0 to 1
          - `y` number, required: Distance from the top edge, from 0 to 1
        - `end` AnnotationPoint, required: A point on the frame, image, or page, as a fraction of its size.
          - `x` number, required: Distance from the left edge, from 0 to 1
          - `y` number, required: Distance from the top edge, from 0 to 1
      - BoxPath: A rectangle with opposite corners at `start` and `end`.
        - `tool` 'box', required
        - `color` string, required: Hex color, such as `#22C55E`
        - `stroke_width` number, required: Line width in screen pixels
        - `start` AnnotationPoint, required: A point on the frame, image, or page, as a fraction of its size.
          - `x` number, required: Distance from the left edge, from 0 to 1
          - `y` number, required: Distance from the top edge, from 0 to 1
        - `end` AnnotationPoint, required: A point on the frame, image, or page, as a fraction of its size.
          - `x` number, required: Distance from the left edge, from 0 to 1
          - `y` number, required: Distance from the top edge, from 0 to 1
  - `page` integer, nullable, required: Page number (1-indexed) for document comments
  - `text_highlight` TextHighlight: Text highlighted on a document page.
    - `text` string, required: The highlighted text
    - `rects` TextHighlightRect[], required: Rectangles covering the highlighted text on the page
      - `x` number, required: Left edge, from 0 to 1
      - `y` number, required: Top edge, from 0 to 1
      - `width` number, required: Width, from 0 to 1
      - `height` number, required: Height, from 0 to 1
  - `is_resolved` boolean, required: Whether the thread is resolved
  - `private` boolean, required: Hidden from share-link guests.
  - `number` integer, nullable, required: The comment's number on the asset, as in #3. Null for replies.
  - `user` UserInfo, required: Lightweight user information for API responses
    - `id` string, uuid, required: User ID
    - `first_name` string, required: User's first name
    - `last_name` string, required: User's last name
    - `email` string, required: User's email address
    - `avatar_url` string, nullable: User's avatar URL
  - `replies` CommentResponse[], required: Replies to this comment
  - `reactions` ReactionGroup[], required: Reactions grouped by emoji
    - `reaction` string, required: An emoji, such as 👍.
    - `users` UserInfo[], required: Users who added this reaction
      - `id` string, uuid, required: User ID
      - `first_name` string, required: User's first name
      - `last_name` string, required: User's last name
      - `email` string, required: User's email address
      - `avatar_url` string, nullable: User's avatar URL
  - `mentions` MentionInfo[], required: Users mentioned in the text
    - `start_index` integer, required: Start position in comment text
    - `end_index` integer, required: End position in comment text (non-inclusive)
    - `text` string, required: Mention text (e.g., '@John Doe')
    - `user` UserInfo, required: Lightweight user information for API responses
      - `id` string, uuid, required: User ID
      - `first_name` string, required: User's first name
      - `last_name` string, required: User's last name
      - `email` string, required: User's email address
      - `avatar_url` string, nullable: User's avatar URL
  - `attachments` SignedAttachment[], required: Attached files
    - `id` string, uuid, required: Resource identifier
    - `url` string, nullable: Temporary download URL
    - `url_expires_at` string, date-time, nullable: When the URL expires
    - `filename` string, required: Original filename
    - `mime_type` string, required: MIME type of the file
    - `size_bytes` integer, required: File size in bytes
    - `created` string, date-time, required: Created timestamp
  - `created` string, date-time, required: Creation timestamp
  - `updated` string, date-time, required: Last update timestamp

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/aspect/apis/aspect-api.md) - [All operations](https://skmtc.dev/aspect/apis/aspect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aspect/apis/aspect-api/revisions/28ea5f1adb54?raw)
