---
title: "Edit your own comment"
method: PATCH
path: "/api/sites/{slug}/comments/{commentId}"
tags: ["site-controller"]
---

# Edit your own comment

`PATCH /api/sites/{slug}/comments/{commentId}`

## Request

- Base URL: `https://api.pagegoat.com`
- URL: `https://api.pagegoat.com/api/sites/{slug}/comments/{commentId}`
- Auth: HTTP bearer

Authors only. The anchor is not editable.

## Path parameters

- `slug` string, required
- `commentId` string, uuid, required

## Request body

- UpdateCommentRequest: New text for a comment you authored.
  - `body` string, required: The replacement text. Required; blank is rejected with 400.

## Response `200`

The updated comment.

## Other responses

- `403`: Not the author.
- `404`: No such comment on this site.

---

[API](https://skmtc.dev/pagegoat/apis/pagegoat-api.md) · [All operations](https://skmtc.dev/pagegoat/apis/pagegoat-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pagegoat/apis/pagegoat-api/revisions/3e87219680af?raw)
