---
title: "Create a discussion comment (Legacy)"
method: POST
path: "/teams/{team_id}/discussions/{discussion_number}/comments"
tags: ["teams"]
deprecated: true
---

# Create a discussion comment (Legacy)

`POST /teams/{team_id}/discussions/{discussion_number}/comments`

> **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 comment](https://docs.github.com/enterprise-server@3.6/rest/teams/discussion-comments#create-a-discussion-comment) endpoint.

Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).

This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/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.6/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.6/rest/guides/best-practices-for-using-the-rest-api)."

## Path parameters

- `team_id` integer, required
- `discussion_number` integer, required

## Request body

- object
  - `body` string, required — The discussion comment's body text.

## Response `201`

Response

- TeamDiscussionComment — A reply to a discussion within a team.
  - `author` NullableSimpleUser, nullable, required — A GitHub user.
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
  - `body` string, required — The main text of the comment.
  - `body_html` string, required
  - `body_version` string, required — 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.
  - `created_at` string, date-time, required
  - `last_edited_at` string, date-time, nullable, required
  - `discussion_url` string, uri, required
  - `html_url` string, uri, required
  - `node_id` string, required
  - `number` integer, required — The unique sequence number of a team discussion comment.
  - `updated_at` string, date-time, required
  - `url` string, uri, required
  - `reactions` ReactionRollup
    - `url` string, uri, required
    - `total_count` integer, required
    - `+1` integer, required
    - `-1` integer, required
    - `laugh` integer, required
    - `confused` integer, required
    - `heart` integer, required
    - `hooray` integer, required
    - `eyes` integer, required
    - `rocket` integer, required

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-5.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-5/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-5/versions/50ae54440071/schema)
