---
title: "Update a commit comment"
method: PATCH
path: "/repos/{owner}/{repo}/comments/{comment_id}"
tags: ["repos"]
---

# Update a commit comment

`PATCH /repos/{owner}/{repo}/comments/{comment_id}`

Updates the contents of a specified commit comment.

This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.

## Path parameters

- `owner` string, required
- `repo` string, required
- `comment_id` integer, required

## Request body

- object
  - `body` string, required — The contents of the comment

## Response `200`

Response

- CommitComment — Commit Comment
  - `html_url` string, uri, required
  - `url` string, uri, required
  - `id` integer, required
  - `node_id` string, required
  - `body` string, required
  - `path` string, nullable, required
  - `position` integer, nullable, required
  - `line` integer, nullable, required
  - `commit_id` string, required
  - `user` NullableSimpleUser, nullable, required — A GitHub user.
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
    - `user_view_type` string
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `author_association` 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER', required — How the author is associated with the repository.
  - `reactions` ReactionRollup
    - `url` string, uri, required
    - `total_count` integer, required
    - `+1` integer, required
    - `-1` integer, required
    - `laugh` integer, required
    - `confused` integer, required
    - `heart` integer, required
    - `hooray` integer, required
    - `eyes` integer, required
    - `rocket` integer, required

## Other responses

- `404` — Resource not found

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
