---
title: "Edit a comment"
method: PATCH
path: "/repos/{owner}/{repo}/issues/{index}/comments/{id}"
tags: ["Issues"]
---

# Edit a comment

`PATCH /repos/{owner}/{repo}/issues/{index}/comments/{id}`

## Path parameters

- `owner` string, required
- `repo` string, required
- `index` string, required
- `id` string, required

## Request body

- object
  - `body` string, required

## Response `200`

Success

- Comment
  - `id` integer
  - `html_url` string
  - `user` User
    - `id` integer
    - `username` string
    - `login` string — Alias of username for GitHub API compatibility
    - `full_name` string
    - `email` string, email
    - `avatar_url` string
  - `body` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `404` — Resource not found.
- `422` — Validation error.

---

[API](https://skmtc.net/gogs/apis/gogs-api.md) · [All operations](https://skmtc.net/gogs/apis/gogs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gogs/gogs-api/versions/87e2da32266c/schema)
