Create a discussion (Legacy)
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 [`Create a discussion`](https://docs.github.com/[email protected]/rest/reference/teams#create-a-discussion) endpoint. Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/[email protected]/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/[email protected]/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/[email protected]/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
/teams/{team_id}/discussions- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- team_id integerrequired
Body Params
requiredThe discussion post's body text.
Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post.
The discussion post's title.
Responses
Response
author Simple User objectrequirednullable Simple User
Simple User
Example: https://github.com/images/error/octocat_happy.gif
Example: https://api.github.com/users/octocat/events{/privacy}
Example: https://api.github.com/users/octocat/followers
Example: https://api.github.com/users/octocat/following{/other_user}
Example: https://api.github.com/users/octocat/gists{/gist_id}
Example: 41d064eb2195891e12d0413f63227ea7
Example: https://github.com/octocat
Example: 1
Example: octocat
Example: MDQ6VXNlcjE=
Example: https://api.github.com/users/octocat/orgs
Example: https://api.github.com/users/octocat/received_events
Example: https://api.github.com/users/octocat/repos
Example: "2020-07-09T00:17:55Z"
Example: https://api.github.com/users/octocat/starred{/owner}{/repo}
Example: https://api.github.com/users/octocat/subscriptions
Example: User
Example: https://api.github.com/users/octocat
The main text of the discussion.
Example: Please suggest improvements to our workflow in comments.
Example: <p>Hi! This is an area for us to collaborate as a team</p>
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
Example: 0
Example: https://api.github.com/organizations/1/team/2343027/discussions/1/comments
Example: 2018-01-25T18:56:31Z
Example: https://github.com/orgs/github/teams/justice-league/discussions/1
Example: MDE0OlRlYW1EaXNjdXNzaW9uMQ==
The unique sequence number of a team discussion.
Example: 42
Whether or not this discussion should be pinned for easy retrieval.
Example: true
Whether or not this discussion should be restricted to team members and organization administrators.
Example: true
reactions Reaction Rollup objectoptional
Example: https://api.github.com/organizations/1/team/2343027
The title of the discussion.
Example: How can we improve our workflow?
Example: 2018-01-25T18:56:31Z
Example: https://api.github.com/organizations/1/team/2343027/discussions/1