---
title: "Edit a comment"
method: PUT
path: "/sheets/{sheetId}/comments/{commentId}"
tags: ["comments"]
---

# Edit a comment

`PUT /sheets/{sheetId}/comments/{commentId}`

Updates the text of a comment. NOTE: Only the user that created the comment is permitted to update it.

## Headers

- `Content-Type` string

## Request body

- CommentCreateRequest
  - `text` string — Comment body.

## Response `200`

SUCCESS

- object
  - `message` 'PARTIAL_SUCCESS' | 'SUCCESS' — Message that indicates the outcome of the request. (One of `SUCCESS` or `PARTIAL_SUCCESS`.)
  - `resultCode` 0 | 3 — * '0' Success * '3' Partial Success of Bulk Operation
  - `result` Comment
    - `attachments` Attachment[] — Array of attachments on comments.
      - `id` number — Attachment ID.
      - `parentId` number — The ID of the parent.
      - `attachmentType` 'BOX_COM' | 'DROPBOX' | 'EGNYTE' | 'EVERNOTE' | 'FILE' | 'GOOGLE_DRIVE' | 'LINK' | 'ONEDRIVE' | 'TRELLO' — Attachment type. Note--Dropbox, Egnyte, and Evernote are not supported for Smartsheet.gov accounts.
      - `attachmentSubType` 'DOCUMENT' | 'DRAWING' | 'FOLDER' | 'PDF' | 'PRESENTATION' | 'SPREADSHEET' — Attachment sub type. Note--Folder type is for EGNYTE values and the rest are GOOGLE_DRIVE values.
      - `mimeType` string — Attachment MIME type.
      - `parentType` 'COMMENT' | 'PROOF' | 'ROW' | 'SHEET' — The type of object the attachment belongs to.
      - `createdAt` union
        - string, date-time
        - number
      - `createdBy` MiniUser — MiniUser Object
        - `email` string, email
        - `name` string
      - `name` string — Attachment name.
      - `sizeInKb` number — The size of the file, if the attachmentType is FILE.
      - `url` string — Attachment temporary URL (files only).
      - `urlExpiresInMillis` number — Attachment temporary URL time to live (files only).
    - `createdAt` union
      - string, date-time
      - number
    - `createdBy` MiniUser — MiniUser Object
      - `email` string, email
      - `name` string
    - `discussionId` number — Discussion ID of discussion that contains comment.
    - `id` number — Comment ID.
    - `modifiedAt` union
      - string, date-time
      - number
    - `text` string — Comment body.
  - `version` number, nullable — New version of the Sheet. Applicable only for operations which update sheet data.

---

[API](https://skmtc.net/smartsheet/apis/smartsheet-openapi-reference.md) · [All operations](https://skmtc.net/smartsheet/apis/smartsheet-openapi-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smartsheet/smartsheet-openapi-reference/versions/b4afda95fb51/schema)
