# Create reaction for a team discussion (Legacy)

From **GitHub v3 REST API**.

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

**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 reaction for a team discussion`](https://docs.github.com/enterprise-server@3.0/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint.

Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.0/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.0/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.

## Parameters

### `team_id`

- Location: path
- Required: true
- Type: `integer`

### `discussion_number`

- Location: path
- Required: true
- Type: `integer`

## Request body

- Required: true
### `application/json`

- Type: `object`

```json
{
  "content": "heart"
}
```

```json
{"properties":{"content":{"description":"The [reaction type](https://docs.github.com/enterprise-server@3.0/rest/reference/reactions#reaction-types) to add to the team discussion.","enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"type":"string"}},"required":["content"],"type":"object"}
```

## Responses

### `201`

Response

### `application/json`

- Type: `object`

Reactions to conversations provide a way to help people express their feelings more simply and effectively.

```json
{
  "content": "heart",
  "created_at": "2016-05-20T20:09:31Z",
  "id": 1,
  "node_id": "MDg6UmVhY3Rpb24x",
  "user": {
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "gravatar_id": "",
    "html_url": "https://github.com/octocat",
    "id": 1,
    "login": "octocat",
    "node_id": "MDQ6VXNlcjE=",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "site_admin": false,
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "type": "User",
    "url": "https://api.github.com/users/octocat"
  }
}
```

```json
{"description":"Reactions to conversations provide a way to help people express their feelings more simply and effectively.","properties":{"content":{"description":"The reaction to use","enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"example":"heart","type":"string"},"created_at":{"example":"2016-05-20T20:09:31Z","format":"date-time","type":"string"},"id":{"example":1,"type":"integer"},"node_id":{"example":"MDg6UmVhY3Rpb24x","type":"string"},"user":{"$ref":"#/components/schemas/nullable-simple-user"}},"required":["id","node_id","user","content","created_at"],"title":"Reaction","type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url {protocol}://{hostname}/api/v3/teams/{team_id}/discussions/{discussion_number}/reactions \
  --header 'content-type: application/json' \
  --data '{
  "content": "heart"
}'
```
