---
title: "Edit a comment or resolve a thread"
method: PATCH
path: "/api/comments/{id}"
tags: ["comments"]
---

# Edit a comment or resolve a thread

`PATCH /api/comments/{id}`

## Request

- Base URL: `https://telawiki.com`
- URL: `https://telawiki.com/api/comments/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `tela_session`

Send exactly one field. `body` is an **author-only** edit; `resolved` is an `editor+` toggle and applies to **root comments only**. Setting `resolved` to the value it already holds is a 409.

## Request body

- object
  - `body` string
  - `resolved` boolean

## Response `200`

The comment.

- object
  - `comment` Comment, required
    - `id` integer, required
    - `page_id` integer, required
    - `parent_id` integer, nullable, required: Null on a root comment.
    - `author_id` integer, required
    - `author_username` string, required
    - `body` string, required
    - `anchor_prefix` string: Root comments only — the text before the quoted span.
    - `anchor_exact` string: Root comments only — the quoted span.
    - `anchor_suffix` string: Root comments only — the text after the quoted span.
    - `resolved` boolean, required
    - `resolved_at` string
    - `resolved_by` integer
    - `resolved_by_username` string
    - `created_at` string, required: `YYYY-MM-DD HH:MM:SS` in UTC.
    - `updated_at` string, required: `YYYY-MM-DD HH:MM:SS` in UTC.

## Other responses

- `400`: `bad_request` — no fields, both fields, an over-long body, or `resolved` on a reply.
- `403`: `forbidden` (no access, or the role is too low), `viewer_no_write`, `api_key_scope` (the token's scope forbids this method), or `api_key_space_scope` (the token is pinned to another space).
- `404`: `comment_not_found`.
- `409`: `comment_already_resolved` — the thread is already in the state you asked for.
- `500`: `internal` — server error.

---

[API](https://skmtc.dev/telawiki/apis/tela-rest-api.md) · [All operations](https://skmtc.dev/telawiki/apis/tela-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telawiki/apis/tela-rest-api/revisions/f316f31f6fcb?raw)
