---
title: "Update a comment on a post"
method: PATCH
path: "/posts/{id}/comments/{commentId}"
tags: ["Posts"]
---

# Update a comment on a post

`PATCH /posts/{id}/comments/{commentId}`

Updates the text of a comment. Only the comment author (the user who created the API token) can edit it.

## Path parameters

- `id` string, required
- `commentId` string, required

## Request body

- object
  - `text` string, required

## Response `200`

Comment updated

- object
  - `data` object, required
    - `id` string, required
    - `postId` string, required
    - `text` string, required
    - `authorId` string, required
    - `teamOnly` boolean, required
    - `replyFor` string
    - `reactions` object[], required
      - `emoji` string, required
      - `emojiId` string, required
      - `emojiSkin` integer, required
      - `emojiNative` string, required
      - `users` object[], required
        - `userId` string, required
        - `userName` string
        - `createdAt` string, date-time
    - `createdAt` string, date-time, required

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `403` — Only the comment author can edit it
- `404` — Post or comment not found
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/planable/apis/planable-public-api.md) · [All operations](https://skmtc.net/planable/apis/planable-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/planable/planable-public-api/revisions/e91a4f756dfe/schema)
