# Update a commit comment

From **GitHub v3 REST API**.

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

Update a commit comment

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

### `comment_id`

- Location: path
- Required: true
- Type: `integer`

comment_id parameter

## Request body

- Required: true
### `application/json`

- Type: `object`

```json
{
  "body": "Nice change"
}
```

```json
{"properties":{"body":{"description":"The contents of the comment","type":"string"}},"required":["body"],"type":"object"}
```

## Responses

### `200`

Response

### `application/json`

- Type: `object`

Commit Comment

```json
{
  "author_association": "COLLABORATOR",
  "body": "Nice change",
  "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "created_at": "2011-04-14T16:00:49Z",
  "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1",
  "id": 1,
  "line": 14,
  "node_id": "MDEzOkNvbW1pdENvbW1lbnQx",
  "path": "file1.txt",
  "position": 4,
  "updated_at": "2011-04-14T16:00:49Z",
  "url": "https://api.github.com/repos/octocat/Hello-World/comments/1",
  "user": {
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "gravatar_id": "",
    "html_url": "https://github.com/octocat",
    "id": 1,
    "login": "octocat",
    "node_id": "MDQ6VXNlcjE=",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "site_admin": false,
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "type": "User",
    "url": "https://api.github.com/users/octocat"
  }
}
```

```json
{"description":"Commit Comment","properties":{"author_association":{"$ref":"#/components/schemas/author_association"},"body":{"type":"string"},"commit_id":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"html_url":{"format":"uri","type":"string"},"id":{"type":"integer"},"line":{"nullable":true,"type":"integer"},"node_id":{"type":"string"},"path":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"reactions":{"$ref":"#/components/schemas/reaction-rollup"},"updated_at":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"},"user":{"$ref":"#/components/schemas/nullable-simple-user"}},"required":["url","html_url","id","node_id","user","position","line","path","commit_id","body","author_association","created_at","updated_at"],"title":"Commit Comment","type":"object"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request PATCH \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/comments/{comment_id} \
  --header 'content-type: application/json' \
  --data '{
  "body": "Nice change"
}'
```
