---
title: "Update comment"
method: PATCH
path: "/forms/{formId}/comments/{commentId}"
tags: ["Comments"]
---

# Update comment

`PATCH /forms/{formId}/comments/{commentId}`

Updates the body or state of a comment. Requires ownership.

## Request body

- CommentUpdate
  - `body` string
  - `state` 'hidden' | 'visible'

## Response `200`

Comment updated successfully.

- Comment
  - `id` string, ulid, required
  - `form` string, ulid, required
  - `user` string, ulid, required
  - `body` string, required
  - `state` 'hidden' | 'visible'
  - `element` string, required
  - `parent` string, ulid, nullable
  - `modified` string, date-time, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity

## Changes

- **2025-07-14** `de597e8f26bc` — 3 info
  - added the new optional request property `state`
  - the request property `body` became optional
  - added the optional property `state` to the response with the `200` status
- **2025-07-13** `02015e1343c5` — 1 info
  - endpoint added
- **2025-07-13** `0d7f3c750979` — 1 breaking
  - api removed without deprecation

[Change history](https://skmtc.dev/osdg-iiith/apis/forms-portal-api/changes/forms/:formId/comments/:commentId/patch.md)

---

[API](https://skmtc.dev/osdg-iiith/apis/forms-portal-api.md) · [All operations](https://skmtc.dev/osdg-iiith/apis/forms-portal-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/osdg-iiith/forms-portal-api/revisions/85c657c8ce11/schema)
