GitHub Discussions API

The Discussions API from GitHub — 14 operation(s) for discussions.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/ https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-discussions-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Discussions API
  description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App

    installations.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Discussions
paths:
  /orgs/{org}/teams/{team_slug}/discussions:
    get:
      summary: GitHub List Discussions
      description: 'List all discussions on a team''s page.


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


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: listDiscussions
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#list-discussions
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - name: pinned
        in: query
        required: false
        description: Pinned discussions only filter
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/team-discussion'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Discussion
      description: 'Creates a new discussion post on a team''s page.


        This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.9/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-server@3.9/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-server@3.9/rest/guides/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`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: createDiscussion
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#create-a-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: The discussion post's title.
                body:
                  type: string
                  description: The discussion post's body text.
                private:
                  type: boolean
                  description: 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.
                  default: false
              required:
              - title
              - body
            examples:
              default:
                value:
                  title: Our first team post
                  body: Hi! This is an area for us to collaborate as a team.
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion'
      x-github:
        triggersNotification: true
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}:
    get:
      summary: GitHub Get Discussion
      description: 'Get a specific discussion on a team''s page.


        **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}`.


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: getDiscussion
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#get-a-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Discussion
      description: 'Edits the title and body text of a discussion post. Only the parameters you provide are updated.


        **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}`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: updateDiscussion
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#update-a-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: The discussion post's title.
                body:
                  type: string
                  description: The discussion post's body text.
            examples:
              default:
                value:
                  title: Welcome to our first team post
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-2'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Discussion
      description: 'Delete a discussion from a team''s page.


        **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}`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: deleteDiscussion
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#delete-a-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments:
    get:
      summary: GitHub List Discussion Comments
      description: 'List all comments on a team discussion.


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


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: listDiscussionComments
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#list-discussion-comments
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/team-discussion-comment'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-comment-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussion-comments
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Discussion Comment
      description: 'Creates a new comment on a team discussion.


        This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.9/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-server@3.9/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-server@3.9/rest/guides/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`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: createDiscussionComment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#create-a-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                body:
                  type: string
                  description: The discussion comment's body text.
              required:
              - body
            examples:
              default:
                value:
                  body: Do you like apples?
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion-comment'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-comment'
      x-github:
        triggersNotification: true
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussion-comments
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}:
    get:
      summary: GitHub Get Discussion Comment
      description: 'Get a specific comment on a team discussion.


        **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}`.


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: getDiscussionComment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#get-a-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/comment-number'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion-comment'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-comment'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussion-comments
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Discussion Comment
      description: 'Edits the body text of a discussion comment.


        **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}`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: updateDiscussionComment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#update-a-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/comment-number'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                body:
                  type: string
                  description: The discussion comment's body text.
              required:
              - body
            examples:
              default:
                value:
                  body: Do you like pineapples?
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion-comment'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-comment-2'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussion-comments
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Discussion Comment
      description: 'Deletes a comment on a team discussion.


        **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}`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: deleteDiscussionComment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#delete-a-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/comment-number'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussion-comments
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions:
    get:
      summary: GitHub List Reactions for Team Discussion Comment
      description: 'List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#get-a-discussion-comment).


        **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/reactions`.


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: listReactionsForTeamDiscussionComment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/comment-number'
      - name: content
        description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment.
        in: query
        required: false
        schema:
          type: string
          enum:
          - '+1'
          - '-1'
          - laugh
          - confused
          - heart
          - hooray
          - rocket
          - eyes
        example: '+1'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/reaction'
              examples:
                default:
                  $ref: '#/components/examples/reaction-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: reactions
        subcategory: reactions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Reaction for Team Discussion Comment
      description: 'Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#get-a-discussion-comment).


        A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.


        **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/:comment_number/reactions`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: createReactionForTeamDiscussionComment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/comment-number'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: The [reaction type](https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#about-reactions) to add to the team discussion comment.
                  enum:
                  - '+1'
                  - '-1'
                  - laugh
                  - confused
                  - heart
                  - hooray
                  - rocket
                  - eyes
              required:
              - content
            examples:
              default:
                value:
                  content: heart
      responses:
        '200':
          description: Response when the reaction type has already been added to this team discussion comment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reaction'
              examples:
                default:
                  $ref: '#/components/examples/reaction'
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reaction'
              examples:
                default:
                  $ref: '#/components/examples/reaction'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: reactions
        subcategory: reactions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}:
    delete:
      summary: GitHub Delete Team Discussion Comment Reaction
      description: '**Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`.


        Delete a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#get-a-discussion-comment).


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: deleteTeamDiscussionCommentReaction
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#delete-team-discussion-comment-reaction
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/comment-number'
      - $ref: '#/components/parameters/reaction-id'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: reactions
        subcategory: reactions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions:
    get:
      summary: GitHub List Reactions for Team Discussion
      description: 'List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#get-a-discussion).


        **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/reactions`.


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: listReactionsForTeamDiscussion
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#list-reactions-for-a-team-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - name: content
        description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion.
        in: query
        required: false
        schema:
          type: string
          enum:
          - '+1'
          - '-1'
          - laugh
          - confused
          - heart
          - hooray
          - rocket
          - eyes
        example: '+1'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/reaction'
              examples:
                default:
                  $ref: '#/components/examples/reaction-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: reactions
        subcategory: reactions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Reaction for Team Discussion
      description: 'Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#get-a-discussion).


        A response with an HTTP `200` status means that you already added the reaction type to this team discussion.


        **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/reactions`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: createReactionForTeamDiscussion
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#create-reaction-for-a-team-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: The [reaction type](https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#about-reactions) to add to the team discussion.
                  enum:
                  - '+1'
                  - '-1'
                  - laugh
                  - confused
                  - heart
                  - hooray
                  - rocket
                  - eyes
              required:
              - content
            examples:
              default:
                value:
                  content: heart
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reaction'
              examples:
                default:
                  $ref: '#/components/examples/reaction'
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reaction'
              examples:
                default:
                  $ref: '#/components/examples/reaction'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: reactions
        subcategory: reactions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}:
    delete:
      summary: GitHub Delete Team Discussion Reaction
      description: '**Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`.


        Delete a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#get-a-discussion).


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Discussions
      operationId: deleteTeamDiscussionReaction
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#delete-team-discussion-reaction
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/reaction-id'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: reactions
        subcategory: reactions
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /teams/{team_id}/discussions:
    get:
      summary: GitHub List Discussions (legacy)
      description: '**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Te

# --- truncated at 32 KB (689 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-discussions-api-openapi.yml