| title | Reactions |
|---|
{% if page.version == 'dotcom' or page.version >= 2.7 %}
{{#tip}}
APIs for managing reactions are 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
{{/tip}}
{:toc}
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 |
🎉 |
GET /repos/:owner/:repo/comments/:id/reactions
| Name | Type | Description |
|---|---|---|
content |
string |
Indicates which type of reaction to return. |
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:reaction) { |h| [h] } %>
POST /repos/:owner/:repo/comments/:id/reactions
| Name | Type | Description |
|---|---|---|
content |
string |
Required. The reaction type |
<%= json :content => 'heart' %>
{{#tip}}
If you have already created a reaction of type content, the previously created reaction will be returned with Status: 200 OK.
{{/tip}}
<%= headers 201 %> <%= json :reaction %>
GET /repos/:owner/:repo/issues/:number/reactions
| Name | Type | Description |
|---|---|---|
content |
string |
Indicates which type of reaction to return. |
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:reaction) { |h| [h] } %>
POST /repos/:owner/:repo/issues/:number/reactions
| Name | Type | Description |
|---|---|---|
content |
string |
Required. The reaction type |
<%= json :content => 'heart' %>
{{#tip}}
If you have already created a reaction of type content, the previously created reaction will be returned with Status: 200 OK.
{{/tip}}
<%= headers 201 %> <%= json :reaction %>
GET /repos/:owner/:repo/issues/comments/:id/reactions
| Name | Type | Description |
|---|---|---|
content |
string |
Indicates which type of reaction to return. |
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:reaction) { |h| [h] } %>
POST /repos/:owner/:repo/issues/comments/:id/reactions
| Name | Type | Description |
|---|---|---|
content |
string |
Required. The reaction type |
<%= json :content => 'heart' %>
{{#tip}}
If you have already created a reaction of type content, the previously created reaction will be returned with Status: 200 OK.
{{/tip}}
<%= headers 201 %> <%= json :reaction %>
GET /repos/:owner/:repo/pulls/comments/:id/reactions
| Name | Type | Description |
|---|---|---|
content |
string |
Indicates which type of reaction to return. |
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:reaction) { |h| [h] } %>
POST /repos/:owner/:repo/pulls/comments/:id/reactions
| Name | Type | Description |
|---|---|---|
content |
string |
Required. The reaction type |
<%= json :content => 'heart' %>
{{#tip}}
If you have already created a reaction of type content, the previously created reaction will be returned with Status: 200 OK.
{{/tip}}
<%= headers 201 %> <%= json :reaction %>
DELETE /reactions/:id
<%= headers 204 %>
{% endif %}