Skip to main content

discussions

Overview

Namediscussions
TypeResource
Idgithub.teams.discussions

Fields

NameDatatypeDescription
reactionsobject
authorobjectA GitHub user.
created_atstring
pinnedbooleanWhether or not this discussion should be pinned for easy retrieval.
comments_countinteger
comments_urlstring
html_urlstring
body_htmlstring
team_urlstring
updated_atstring
body_versionstringThe 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.
urlstring
last_edited_atstring
privatebooleanWhether or not this discussion should be restricted to team members and organization administrators.
numberintegerThe unique sequence number of a team discussion.
node_idstring
bodystringThe main text of the discussion.
titlestringThe title of the discussion.

Methods

NameAccessible byRequired ParamsDescription
get_discussion_in_orgSELECTdiscussion_number, org, team_slugGet a specific discussion on a team's page. 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}.
get_discussion_legacySELECTdiscussion_number, team_idDeprecation 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 endpoint.

Get a specific discussion on a team's page. OAuth access tokens require the read:discussion scope.
list_discussions_in_orgSELECTorg, team_slugList all discussions on a team's page. 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.
list_discussions_legacySELECTteam_idDeprecation 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 discussions endpoint.

List all discussions on a team's page. OAuth access tokens require the read:discussion scope.
create_discussion_in_orgINSERTorg, team_slug, data__body, data__titleCreates a new discussion post on a team's page. 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. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.

Note: You can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.
delete_discussion_in_orgDELETEdiscussion_number, org, team_slugDelete a discussion from a team's page. 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}.
create_discussion_legacyEXECteam_id, data__body, data__titleDeprecation 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 endpoint.

Creates a new discussion post on a team's page. 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. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
delete_discussion_legacyEXECdiscussion_number, team_idDeprecation 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 endpoint.

Delete a discussion from a team's page. OAuth access tokens require the write:discussion scope.
update_discussion_in_orgEXECdiscussion_number, org, team_slugEdits the title and body text of a discussion post. Only the parameters you provide are updated. 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}.
update_discussion_legacyEXECdiscussion_number, team_idDeprecation 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 endpoint.

Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the write:discussion scope.