Update a discussion (Legacy)

PATCH {{baseUrl}}/teams/:team_id/discussions/:discussion_number

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

Request Body

{"title"=>"<string>", "body"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;author&quot;:{&quot;login&quot;:&quot;octocat&quot;,&quot;id&quot;:1,&quot;node_id&quot;:&quot;MDQ6VXNlcjE=&quot;,&quot;avatar_url&quot;:&quot;https://github.com/images/error/octocat_happy.gif&quot;,&quot;gravatar_id&quot;:&quot;&quot;,&quot;url&quot;:&quot;https://api.github.com/users/octocat&quot;,&quot;html_url&quot;:&quot;https://github.com/octocat&quot;,&quot;followers_url&quot;:&quot;https://api.github.com/users/octocat/followers&quot;,&quot;following_url&quot;:&quot;https://api.github.com/users/octocat/following{/other_user}&quot;,&quot;gists_url&quot;:&quot;https://api.github.com/users/octocat/gists{/gist_id}&quot;,&quot;starred_url&quot;:&quot;https://api.github.com/users/octocat/starred{/owner}{/repo}&quot;,&quot;subscriptions_url&quot;:&quot;https://api.github.com/users/octocat/subscriptions&quot;,&quot;organizations_url&quot;:&quot;https://api.github.com/users/octocat/orgs&quot;,&quot;repos_url&quot;:&quot;https://api.github.com/users/octocat/repos&quot;,&quot;events_url&quot;:&quot;https://api.github.com/users/octocat/events{/privacy}&quot;,&quot;received_events_url&quot;:&quot;https://api.github.com/users/octocat/received_events&quot;,&quot;type&quot;:&quot;User&quot;,&quot;site_admin&quot;:false},&quot;body&quot;:&quot;Hi! This is an area for us to collaborate as a team.&quot;,&quot;body_html&quot;:&quot;\u003cp\u003eHi! This is an area for us to collaborate as a team\u003c/p\u003e&quot;,&quot;body_version&quot;:&quot;0d495416a700fb06133c612575d92bfb&quot;,&quot;comments_count&quot;:1,&quot;comments_url&quot;:&quot;https://api.github.com/teams/2343027/discussions/1/comments&quot;,&quot;created_at&quot;:&quot;2018-01-25T18:56:31Z&quot;,&quot;last_edited_at&quot;:&quot;2018-01-26T18:22:20Z&quot;,&quot;html_url&quot;:&quot;https://github.com/orgs/github/teams/justice-league/discussions/1&quot;,&quot;node_id&quot;:&quot;MDE0OlRlYW1EaXNjdXNzaW9uMQ==&quot;,&quot;number&quot;:1,&quot;pinned&quot;:false,&quot;private&quot;:false,&quot;team_url&quot;:&quot;https://api.github.com/teams/2343027&quot;,&quot;title&quot;:&quot;Welcome to our first team post&quot;,&quot;updated_at&quot;:&quot;2018-01-26T18:22:20Z&quot;,&quot;url&quot;:&quot;https://api.github.com/teams/2343027/discussions/1&quot;,&quot;reactions&quot;:{&quot;url&quot;:&quot;https://api.github.com/teams/2343027/discussions/1/reactions&quot;,&quot;total_count&quot;:5,&quot;+1&quot;:3,&quot;-1&quot;:1,&quot;laugh&quot;:0,&quot;confused&quot;:0,&quot;heart&quot;:1,&quot;hooray&quot;:0,&quot;eyes&quot;:1,&quot;rocket&quot;:1}}