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

# Create a discussion (Legacy)

`POST /teams/{team_id}/discussions`

> **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/enterprise-server@3.5/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/enterprise-server@3.5/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).

This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.5/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/enterprise-server@3.5/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.5/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.

## Path parameters

- `team_id` integer, required

## Request body

- object
  - `title` string, required — The discussion post's title.
  - `body` string, required — The discussion post's body text.
  - `private` boolean — 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.

## Response `201`

Response

- TeamDiscussion — A team discussion is a persistent record of a free-form conversation 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 discussion.
  - `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.
  - `comments_count` integer, required
  - `comments_url` string, uri, required
  - `created_at` string, date-time, required
  - `last_edited_at` string, date-time, nullable, required
  - `html_url` string, uri, required
  - `node_id` string, required
  - `number` integer, required — The unique sequence number of a team discussion.
  - `pinned` boolean, required — Whether or not this discussion should be pinned for easy retrieval.
  - `private` boolean, required — Whether or not this discussion should be restricted to team members and organization administrators.
  - `team_url` string, uri, required
  - `title` string, required — The title of the discussion.
  - `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-4.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-4/versions/ee6c7a46328e/schema)
