---
title: "Update Comment"
method: PATCH
path: "/api/v1/comments/{comment_id}"
tags: ["record-comments"]
---

# Update Comment

`PATCH /api/v1/comments/{comment_id}`

Edit a comment. Author only, and it notifies nobody.

``attachment_file_ids`` is the full desired set, not a delta. Mentions
are frozen at what the comment already carried: a new chip flattens to
plain text.

## Path parameters

- `comment_id` integer, required

## Headers

- `authorization` string, nullable
- `X-API-Key` string, nullable

## Request body

- CommentWrite — The body of a create, a reply or an edit — all three take the same shape. ``body_html`` is rich text from the composer and is sanitised on the way in; the stored form is what comes back. ``attachment_file_ids`` are ids from ``POST /api/v1/files/upload``, in the order the author added them. On an edit the list is the full desired set, not a delta: what is absent is detached.
  - `body_html` string, required
  - `attachment_file_ids` string[]

## Response `200`

Successful Response

- CommentResponse — One comment or reply. A soft-deleted comment comes back with ``is_deleted`` true and its body and attachments empty — the row stays so the thread keeps its shape, but a tombstone is not a way to read deleted text.
  - `id` integer, required
  - `object_type` string, required
  - `record_id` integer, required
  - `parent_id` integer, nullable
  - `root_id` integer, nullable
  - `depth` integer, required
  - `author` CommentAuthor — Who wrote a comment. Flattened onto the comment for a single render.
    - `id` integer, required
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `email` string, nullable
    - `user_name` string, nullable
    - `is_active` boolean
  - `body_html` string, required
  - `body_text` string, required
  - `attachments` CommentAttachment[]
    - `file_id` string, required
    - `name` string, required
    - `size` integer, required
    - `content_type` string, nullable
  - `mention_user_ids` integer[]
  - `created_at` string, date-time, required
  - `edited_at` string, date-time, nullable
  - `is_edited` boolean
  - `is_deleted` boolean
  - `can_edit` boolean
  - `can_delete` boolean

## Other responses

- `422` — Validation Error

## Changes

- **2026-10-01** `94b4e475923b` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ninjavan/apis/salesforce-sales-cloud-replacement/changes/api/v1/comments/:comment_id/patch.md)

---

[API](https://skmtc.dev/ninjavan/apis/salesforce-sales-cloud-replacement.md) · [All operations](https://skmtc.dev/ninjavan/apis/salesforce-sales-cloud-replacement/llms.txt) · [OpenAPI document](https://skmtc.dev/ninjavan/apis/salesforce-sales-cloud-replacement/revisions/94b4e475923b?raw)
