Create a discussion
POST
/orgs/{org}/teams/{team_slug}/discussions https://api.github.com
Creates a new discussion post on a team's page.
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_idandteam_idusing the routePOST /organizations/{org_id}/team/{team_id}/discussions.
OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.
Parameters
path Path Parameters
| Name | Type |
|---|---|
org
required
The organization name. The name is not case sensitive. | string |
team_slug
required
The slug of the team name. | string |
Request Body
application/json
required
{ title: string;body: string;private?: boolean; }
Responses
201 application/json
Response
interface TeamDiscussion {
author:SimpleUser | null;
body: string;
body_html: string;
body_version: string;
created_at: string;
last_edited_at: string | null;
html_url: string;
node_id: string;
number: number;
pinned: boolean;
private: boolean;
team_url: string;
title: string;
updated_at: string;
url: string;
reactions?:ReactionRollup ;
}
author:
body: string;
body_html: string;
body_version: string;
created_at: string;
last_edited_at: string | null;
html_url: string;
node_id: string;
number: number;
pinned: boolean;
private: boolean;
team_url: string;
title: string;
updated_at: string;
url: string;
reactions?:
}