# Update a discussion comment (Legacy)

From **GitHub v3 REST API**.

`PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}`

**Deprecated.**

**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/enterprise-server@3.0/rest/reference/teams#update-a-discussion-comment) endpoint.

Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.0/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).

## Parameters

### `team_id`

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

### `discussion_number`

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

### `comment_number`

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

## Request body

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

- Type: `object`

```json
{
  "body": "Do you like pineapples?"
}
```

```json
{"properties":{"body":{"description":"The discussion comment's body text.","type":"string"}},"required":["body"],"type":"object"}
```

## Responses

### `200`

Response

### `application/json`

- Type: `object`

A reply to a discussion within a team.

```json
{
  "author": {
    "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"
  },
  "body": "Do you like pineapples?",
  "body_html": "\u003cp\u003eDo you like pineapples?\u003c/p\u003e",
  "body_version": "e6907b24d9c93cc0c5024a7af5888116",
  "created_at": "2018-01-15T23:53:58Z",
  "discussion_url": "https://api.github.com/teams/2403582/discussions/1",
  "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
  "last_edited_at": "2018-01-26T18:22:20Z",
  "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
  "number": 1,
  "reactions": {
    "+1": 3,
    "-1": 1,
    "confused": 0,
    "eyes": 1,
    "heart": 1,
    "hooray": 0,
    "laugh": 0,
    "rocket": 1,
    "total_count": 5,
    "url": "https://api.github.com/teams/2403582/discussions/1/reactions"
  },
  "updated_at": "2018-01-26T18:22:20Z",
  "url": "https://api.github.com/teams/2403582/discussions/1/comments/1"
}
```

```json
{"description":"A reply to a discussion within a team.","properties":{"author":{"$ref":"#/components/schemas/nullable-simple-user"},"body":{"description":"The main text of the comment.","example":"I agree with this suggestion.","type":"string"},"body_html":{"example":"\u003cp\u003eDo you like apples?\u003c/p\u003e","type":"string"},"body_version":{"description":"The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.","example":"0307116bbf7ced493b8d8a346c650b71","type":"string"},"created_at":{"example":"2018-01-15T23:53:58Z","format":"date-time","type":"string"},"discussion_url":{"example":"https://api.github.com/organizations/1/team/2403582/discussions/1","format":"uri","type":"string"},"html_url":{"example":"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1","format":"uri","type":"string"},"last_edited_at":{"format":"date-time","nullable":true,"type":"string"},"node_id":{"example":"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=","type":"string"},"number":{"description":"The unique sequence number of a team discussion comment.","example":42,"type":"integer"},"reactions":{"$ref":"#/components/schemas/reaction-rollup"},"updated_at":{"example":"2018-01-15T23:53:58Z","format":"date-time","type":"string"},"url":{"example":"https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1","format":"uri","type":"string"}},"required":["author","body","body_html","body_version","created_at","last_edited_at","discussion_url","html_url","node_id","number","updated_at","url"],"title":"Team Discussion Comment","type":"object"}
```

## Request examples

### cURL

```shell
curl --request PATCH \
  --url {protocol}://{hostname}/api/v3/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number} \
  --header 'content-type: application/json' \
  --data '{
  "body": "Do you like pineapples?"
}'
```
