Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-01-04. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

After a site administrator upgrades your Enterprise Server instance to Enterprise Server 3.9 or later, the REST API will be versioned. To learn how to find your instance's version, see "About versions of GitHub Docs". For more information, see "About API versioning."

Team discussion comments

Use the REST API to get, create, edit, and delete discussion comments on a team discussion post.

About team discussion comments

Any member of the team's organization can create and read comments on a public discussion. For more details, see "About team discussions."

These endpoints are only available to authenticated members of the team's organization. OAuth access tokens require the read:org scope. GitHub generates the team's slug from the team name.

List discussion comments

Works with GitHub Apps

List all comments on a team discussion. OAuth access tokens require the read:discussion scope.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments.

Parameters for "List discussion comments"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

team_slug string Required

The slug of the team name.

discussion_number integer Required

The number that identifies the discussion.

Query parameters
Name, Type, Description
direction string

The direction to sort the results by.

Default: desc

Can be one of: asc, desc

per_page integer

The number of results per page (max 100).

Default: 30

page integer

Page number of the results to fetch.

Default: 1

HTTP response status codes for "List discussion comments"

Status codeDescription
200

OK

Code samples for "List discussion comments"

get/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments

Response

Status: 200
[ { "author": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/users/octocat/received_events", "type": "User", "site_admin": false }, "body": "Do you like apples?", "body_html": "<p>Do you like apples?</p>", "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", "created_at": "2018-01-15T23:53:58Z", "last_edited_at": null, "discussion_url": "https://HOSTNAME/teams/2403582/discussions/1", "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", "number": 1, "updated_at": "2018-01-15T23:53:58Z", "url": "https://HOSTNAME/teams/2403582/discussions/1/comments/1", "reactions": { "url": "https://HOSTNAME/teams/2403582/discussions/1/reactions", "total_count": 5, "+1": 3, "-1": 1, "laugh": 0, "confused": 0, "heart": 1, "hooray": 0, "eyes": 1, "rocket": 1 } } ]

Create a discussion comment

Works with GitHub Apps

Creates a new comment on a team discussion. OAuth access tokens require the write:discussion scope.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."

Note: You can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments.

Parameters for "Create a discussion comment"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

team_slug string Required

The slug of the team name.

discussion_number integer Required

The number that identifies the discussion.

Body parameters
Name, Type, Description
body string Required

The discussion comment's body text.

HTTP response status codes for "Create a discussion comment"

Status codeDescription
201

Created

Code samples for "Create a discussion comment"

post/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments \ -d '{"body":"Do you like apples?"}'

Response

Status: 201
{ "author": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/users/octocat/received_events", "type": "User", "site_admin": false }, "body": "Do you like apples?", "body_html": "<p>Do you like apples?</p>", "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", "created_at": "2018-01-15T23:53:58Z", "last_edited_at": null, "discussion_url": "https://HOSTNAME/teams/2403582/discussions/1", "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", "number": 1, "updated_at": "2018-01-15T23:53:58Z", "url": "https://HOSTNAME/teams/2403582/discussions/1/comments/1", "reactions": { "url": "https://HOSTNAME/teams/2403582/discussions/1/reactions", "total_count": 5, "+1": 3, "-1": 1, "laugh": 0, "confused": 0, "heart": 1, "hooray": 0, "eyes": 1, "rocket": 1 } }

Get a discussion comment

Works with GitHub Apps

Get a specific comment on a team discussion. OAuth access tokens require the read:discussion scope.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}.

Parameters for "Get a discussion comment"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

team_slug string Required

The slug of the team name.

discussion_number integer Required

The number that identifies the discussion.

comment_number integer Required

The number that identifies the comment.

HTTP response status codes for "Get a discussion comment"

Status codeDescription
200

OK

Code samples for "Get a discussion comment"

get/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER

Response

Status: 200
{ "author": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/users/octocat/received_events", "type": "User", "site_admin": false }, "body": "Do you like apples?", "body_html": "<p>Do you like apples?</p>", "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", "created_at": "2018-01-15T23:53:58Z", "last_edited_at": null, "discussion_url": "https://HOSTNAME/teams/2403582/discussions/1", "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", "number": 1, "updated_at": "2018-01-15T23:53:58Z", "url": "https://HOSTNAME/teams/2403582/discussions/1/comments/1", "reactions": { "url": "https://HOSTNAME/teams/2403582/discussions/1/reactions", "total_count": 5, "+1": 3, "-1": 1, "laugh": 0, "confused": 0, "heart": 1, "hooray": 0, "eyes": 1, "rocket": 1 } }

Update a discussion comment

Works with GitHub Apps

Edits the body text of a discussion comment. OAuth access tokens require the write:discussion scope.

Note: You can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}.

Parameters for "Update a discussion comment"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

team_slug string Required

The slug of the team name.

discussion_number integer Required

The number that identifies the discussion.

comment_number integer Required

The number that identifies the comment.

Body parameters
Name, Type, Description
body string Required

The discussion comment's body text.

HTTP response status codes for "Update a discussion comment"

Status codeDescription
200

OK

Code samples for "Update a discussion comment"

patch/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER \ -d '{"body":"Do you like pineapples?"}'

Response

Status: 200
{ "author": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/users/octocat/received_events", "type": "User", "site_admin": false }, "body": "Do you like pineapples?", "body_html": "<p>Do you like pineapples?</p>", "body_version": "e6907b24d9c93cc0c5024a7af5888116", "created_at": "2018-01-15T23:53:58Z", "last_edited_at": "2018-01-26T18:22:20Z", "discussion_url": "https://HOSTNAME/teams/2403582/discussions/1", "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", "number": 1, "updated_at": "2018-01-26T18:22:20Z", "url": "https://HOSTNAME/teams/2403582/discussions/1/comments/1", "reactions": { "url": "https://HOSTNAME/teams/2403582/discussions/1/reactions", "total_count": 5, "+1": 3, "-1": 1, "laugh": 0, "confused": 0, "heart": 1, "hooray": 0, "eyes": 1, "rocket": 1 } }

Delete a discussion comment

Works with GitHub Apps

Deletes a comment on a team discussion. OAuth access tokens require the write:discussion scope.

Note: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}.

Parameters for "Delete a discussion comment"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

team_slug string Required

The slug of the team name.

discussion_number integer Required

The number that identifies the discussion.

comment_number integer Required

The number that identifies the comment.

HTTP response status codes for "Delete a discussion comment"

Status codeDescription
204

No Content

Code samples for "Delete a discussion comment"

delete/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER

Response

Status: 204

List discussion comments (Legacy)

Works with GitHub Apps

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 List discussion comments endpoint.

List all comments on a team discussion. OAuth access tokens require the read:discussion scope.

Parameters for "List discussion comments (Legacy)"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
team_id integer Required

The unique identifier of the team.

discussion_number integer Required

The number that identifies the discussion.

Query parameters
Name, Type, Description
direction string

The direction to sort the results by.

Default: desc

Can be one of: asc, desc

per_page integer

The number of results per page (max 100).

Default: 30

page integer

Page number of the results to fetch.

Default: 1

HTTP response status codes for "List discussion comments (Legacy)"

Status codeDescription
200

OK

Code samples for "List discussion comments (Legacy)"

get/teams/{team_id}/discussions/{discussion_number}/comments
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/comments

Response

Status: 200
[ { "author": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/users/octocat/received_events", "type": "User", "site_admin": false }, "body": "Do you like apples?", "body_html": "<p>Do you like apples?</p>", "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", "created_at": "2018-01-15T23:53:58Z", "last_edited_at": null, "discussion_url": "https://HOSTNAME/teams/2403582/discussions/1", "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", "number": 1, "updated_at": "2018-01-15T23:53:58Z", "url": "https://HOSTNAME/teams/2403582/discussions/1/comments/1", "reactions": { "url": "https://HOSTNAME/teams/2403582/discussions/1/reactions", "total_count": 5, "+1": 3, "-1": 1, "laugh": 0, "confused": 0, "heart": 1, "hooray": 0, "eyes": 1, "rocket": 1 } } ]

Create a discussion comment (Legacy)

Works with GitHub Apps

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 Create a discussion comment endpoint.

Creates a new comment on a team discussion. OAuth access tokens require the write:discussion scope.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."

Parameters for "Create a discussion comment (Legacy)"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
team_id integer Required

The unique identifier of the team.

discussion_number integer Required

The number that identifies the discussion.

Body parameters
Name, Type, Description
body string Required

The discussion comment's body text.

HTTP response status codes for "Create a discussion comment (Legacy)"

Status codeDescription
201

Created

Code samples for "Create a discussion comment (Legacy)"

post/teams/{team_id}/discussions/{discussion_number}/comments
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/comments \ -d '{"body":"Do you like apples?"}'

Response

Status: 201
{ "author": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/users/octocat/received_events", "type": "User", "site_admin": false }, "body": "Do you like apples?", "body_html": "<p>Do you like apples?</p>", "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", "created_at": "2018-01-15T23:53:58Z", "last_edited_at": null, "discussion_url": "https://HOSTNAME/teams/2403582/discussions/1", "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", "number": 1, "updated_at": "2018-01-15T23:53:58Z", "url": "https://HOSTNAME/teams/2403582/discussions/1/comments/1", "reactions": { "url": "https://HOSTNAME/teams/2403582/discussions/1/reactions", "total_count": 5, "+1": 3, "-1": 1, "laugh": 0, "confused": 0, "heart": 1, "hooray": 0, "eyes": 1, "rocket": 1 } }

Get a discussion comment (Legacy)

Works with GitHub Apps

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 Get a discussion comment endpoint.

Get a specific comment on a team discussion. OAuth access tokens require the read:discussion scope.

Parameters for "Get a discussion comment (Legacy)"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
team_id integer Required

The unique identifier of the team.

discussion_number integer Required

The number that identifies the discussion.

comment_number integer Required

The number that identifies the comment.

HTTP response status codes for "Get a discussion comment (Legacy)"

Status codeDescription
200

OK

Code samples for "Get a discussion comment (Legacy)"

get/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER

Response

Status: 200
{ "author": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/users/octocat/received_events", "type": "User", "site_admin": false }, "body": "Do you like apples?", "body_html": "<p>Do you like apples?</p>", "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", "created_at": "2018-01-15T23:53:58Z", "last_edited_at": null, "discussion_url": "https://HOSTNAME/teams/2403582/discussions/1", "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", "number": 1, "updated_at": "2018-01-15T23:53:58Z", "url": "https://HOSTNAME/teams/2403582/discussions/1/comments/1", "reactions": { "url": "https://HOSTNAME/teams/2403582/discussions/1/reactions", "total_count": 5, "+1": 3, "-1": 1, "laugh": 0, "confused": 0, "heart": 1, "hooray": 0, "eyes": 1, "rocket": 1 } }

Update a discussion comment (Legacy)

Works with GitHub Apps

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 endpoint.

Edits the body text of a discussion comment. OAuth access tokens require the write:discussion scope.

Parameters for "Update a discussion comment (Legacy)"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
team_id integer Required

The unique identifier of the team.

discussion_number integer Required

The number that identifies the discussion.

comment_number integer Required

The number that identifies the comment.

Body parameters
Name, Type, Description
body string Required

The discussion comment's body text.

HTTP response status codes for "Update a discussion comment (Legacy)"

Status codeDescription
200

OK

Code samples for "Update a discussion comment (Legacy)"

patch/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER \ -d '{"body":"Do you like pineapples?"}'

Response

Status: 200
{ "author": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/users/octocat/received_events", "type": "User", "site_admin": false }, "body": "Do you like pineapples?", "body_html": "<p>Do you like pineapples?</p>", "body_version": "e6907b24d9c93cc0c5024a7af5888116", "created_at": "2018-01-15T23:53:58Z", "last_edited_at": "2018-01-26T18:22:20Z", "discussion_url": "https://HOSTNAME/teams/2403582/discussions/1", "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", "number": 1, "updated_at": "2018-01-26T18:22:20Z", "url": "https://HOSTNAME/teams/2403582/discussions/1/comments/1", "reactions": { "url": "https://HOSTNAME/teams/2403582/discussions/1/reactions", "total_count": 5, "+1": 3, "-1": 1, "laugh": 0, "confused": 0, "heart": 1, "hooray": 0, "eyes": 1, "rocket": 1 } }

Delete a discussion comment (Legacy)

Works with GitHub Apps

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 Delete a discussion comment endpoint.

Deletes a comment on a team discussion. OAuth access tokens require the write:discussion scope.

Parameters for "Delete a discussion comment (Legacy)"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
team_id integer Required

The unique identifier of the team.

discussion_number integer Required

The number that identifies the discussion.

comment_number integer Required

The number that identifies the comment.

HTTP response status codes for "Delete a discussion comment (Legacy)"

Status codeDescription
204

No Content

Code samples for "Delete a discussion comment (Legacy)"

delete/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER

Response

Status: 204