Reaction types
When creating a reaction, the allowed values for the content parameter are as follows (with the corresponding emoji for reference):
| content | emoji |
|---|---|
+1 | 👍 |
-1 | 👎 |
laugh | 😄 |
confused | 😕 |
heart | ❤️ |
hooray | 🎉 |
rocket | 🚀 |
eyes | 👀 |
Delete a reaction
OAuth access tokens require the write:discussion scope, when deleting a team discussion or team discussion comment.
delete /reactions/{reaction_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
accept |
string | header |
Setting to |
accept |
string | header | This API is under preview and subject to change. |
reaction_id |
integer | path |
Code samples
Shell
curl \
-X DELETE \
-H "Accept: application/vnd.github.v3+json" \
http(s)://{hostname}/api/v3/reactions/42
JavaScript (@octokit/core.js)
await octokit.request('DELETE /reactions/{reaction_id}', {
reaction_id: 42
})
Response
Status: 204 No Content
Notes
Preview notice
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List reactions for a commit comment
List the reactions to a commit comment.
get /repos/{owner}/{repo}/comments/{comment_id}/reactions