Reactions
The Reactions API enables you to create, list and delete reactions.
Create reaction (comment)
Create reaction for a comment.
POST /api/comments/{id}/reactions
Path parameters
id
integer requiredComment id.
Body parameters
content
string requiredA single emoji character describing the reaction, e.g. '
👍
' or '❤️
'.
Response codes
204 No Content
404 Not Found
Code sample
curl https://{WEAVY-SERVER}/api/comments/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
-H "Content-Type: application/json"
-d "{ 'content': '😍' }"
Delete reaction (comment)
Delete authenticated user's reaction to a comment.
DELETE /api/comments/{id}/reactions
Path parameters
id
integer requiredComment id.
Response codes
200 Success
404 Not Found
400 Bad Request
Code sample
$ curl -X DELETE {WEAVY_SERVER}/api/comments/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
List reactions (comment)
List reactions for a comment.
GET /api/comments/{id}/reactions
Path parameters
id
integer requiredComment id.
Query parameters
content
stringLists reactions with the specified emoji character. Omit this parameter to list all reactions.
q
stringA query used to find matching items.
tag
stringList items with the specified tag.
trashed
booleanIndicates whether trashed items should be listed (default is
false
). Specifynull
to return both trashed and non-trashed items.
order_by
stringSpecifies the sort order and direction for the listing, e.g. "
name
" or "name+desc
"
top
integerMaximum number of items to return in the listing. Should be a value between
0
and100
. Default is25
.
skip
integerThe number of items to skip. Used together with
top
to return a specific range of items (for pagination).
count
booleanfalse
to skip counting the total number of matching items; default istrue
.
count_only
booleantrue
to only return the number of matching items; when this is specified the response will only contain thecount
property.
Response codes
200 Success
{
"data": [
"object"
],
"start": "integer",
"end": "integer",
"count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/comments/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Create reaction (message)
Create reaction for a message.
POST /api/messages/{id}/reactions
Path parameters
id
integer requiredMessage id.
Body parameters
content
string requiredA single emoji character describing the reaction, e.g. '
👍
' or '❤️
'.
Response codes
204 No Content
404 Not Found
Code sample
curl https://{WEAVY-SERVER}/api/messages/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
-H "Content-Type: application/json"
-d "{ 'content': '😍' }"
Delete reaction (message)
Delete authenticated user's reaction to a message.
DELETE /api/messages/{id}/reactions
Path parameters
id
integer requiredMessage id.
Response codes
200 Success
404 Not Found
400 Bad Request
Code sample
$ curl -X DELETE {WEAVY_SERVER}/api/messages/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
List reactions (message)
List reactions for a message.
GET /api/messages/{id}/reactions
Path parameters
id
integer requiredMessage id.
Query parameters
content
stringLists reactions with the specified emoji character. Omit this parameter to list all reactions.
q
stringA query used to find matching items.
tag
stringList items with the specified tag.
trashed
booleanIndicates whether trashed items should be listed (default is
false
). Specifynull
to return both trashed and non-trashed items.
order_by
stringSpecifies the sort order and direction for the listing, e.g. "
name
" or "name+desc
"
top
integerMaximum number of items to return in the listing. Should be a value between
0
and100
. Default is25
.
skip
integerThe number of items to skip. Used together with
top
to return a specific range of items (for pagination).
count
booleanfalse
to skip counting the total number of matching items; default istrue
.
count_only
booleantrue
to only return the number of matching items; when this is specified the response will only contain thecount
property.
Response codes
200 Success
{
"data": [
"object"
],
"start": "integer",
"end": "integer",
"count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/messages/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Create reaction (post)
Create reaction for a post.
POST /api/posts/{id}/reactions
Path parameters
id
integer requiredPost id.
Body parameters
content
string requiredA single emoji character describing the reaction, e.g. '
👍
' or '❤️
'.
Response codes
204 No Content
404 Not Found
Code sample
curl https://{WEAVY-SERVER}/api/posts/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
-H "Content-Type: application/json"
-d "{ 'content': '😍' }"
Delete reaction (post)
Delete authenticated user's reaction to a post.
DELETE /api/posts/{id}/reactions
Path parameters
id
integer requiredPost id.
Response codes
200 Success
404 Not Found
400 Bad Request
Code sample
$ curl -X DELETE {WEAVY_SERVER}/api/posts/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
List reactions (post)
List reactions for a post.
GET /api/posts/{id}/reactions
Path parameters
id
integer requiredPost id.
Query parameters
content
stringLists reactions with the specified emoji character. Omit this parameter to list all reactions.
q
stringA query used to find matching items.
tag
stringList items with the specified tag.
trashed
booleanIndicates whether trashed items should be listed (default is
false
). Specifynull
to return both trashed and non-trashed items.
order_by
stringSpecifies the sort order and direction for the listing, e.g. "
name
" or "name+desc
"
top
integerMaximum number of items to return in the listing. Should be a value between
0
and100
. Default is25
.
skip
integerThe number of items to skip. Used together with
top
to return a specific range of items (for pagination).
count
booleanfalse
to skip counting the total number of matching items; default istrue
.
count_only
booleantrue
to only return the number of matching items; when this is specified the response will only contain thecount
property.
Response codes
200 Success
{
"data": [
"object"
],
"start": "integer",
"end": "integer",
"count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/posts/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Get reaction
Get a reaction by id.
GET /api/reactions/{id}
Path parameters
id
integer requiredReaction id.
Response codes
200 Success
{
"id": "integer",
"content": "string",
"created_at": "string",
"created_by_id": "integer",
"count": "integer"
}
404 Not Found
Code sample
curl https://{WEAVY-SERVER}/api/reactions/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Delete reaction
Delete a reaction.
DELETE /api/reactions/{id}
Path parameters
id
integer requiredReaction id.
Response codes
200 Success
404 Not Found
400 Bad Request
Code sample
$ curl -X DELETE {WEAVY_SERVER}/api/reactions/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"