Reactions

The Reactions API enables you to create, list and delete reactions.

React to post

Create reaction for a post.

POST /api/posts/{id}/reactions
Path parameters
id integer required

Post id.

Body parameters
content string required

A single emoji character describing the reaction, e.g. '👍' or '❤️'.

Example request
curl https://{WEAVY-SERVER}/api/posts/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
--json "{ 'content': '😍' }"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Validation Failed

React to comment

Create reaction for a comment.

POST /api/comments/{id}/reactions
Path parameters
id integer required

Comment id.

Body parameters
content string required

A single emoji character describing the reaction, e.g. '👍' or '❤️'.

Example request
curl https://{WEAVY-SERVER}/api/comments/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
--json "{ 'content': '😍' }"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Validation Failed

React to message

Create reaction for a message.

POST /api/messages/{id}/reactions
Path parameters
id integer required

Message id.

Body parameters
content string required

A single emoji character describing the reaction, e.g. '👍' or '❤️'.

Example request
curl https://{WEAVY-SERVER}/api/messages/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
--json "{ 'content': '😍' }"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Validation Failed

Get reaction

Get a reaction by id.

GET /api/reactions/{id}
Path parameters
id integer required

Reaction id.

Example request
curl https://{WEAVY-SERVER}/api/reactions/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "id": "integer",
  "parent": {
    "id": "integer",
    "type": "string"
  },
  "content": "string",
  "created_at": "string",
  "created_by_id": "integer",
  "created_by": {
    "id": "integer",
    "uid": "string",
    "display_name": "string",
    "email": "string",
    "given_name": "string",
    "middle_name": "string",
    "name": "string",
    "family_name": "string",
    "nickname": "string",
    "phone_number": "string",
    "comment": "string",
    "directory_id": "integer",
    "picture_id": "integer",
    "avatar_url": "string",
    "metadata": "object",
    "tags": [
      "string"
    ],
    "presence": "string",
    "created_at": "string",
    "modified_at": "string",
    "is_bot": "boolean",
    "is_suspended": "boolean",
    "is_trashed": "boolean"
  },
  "count": "integer"
}

List post reactions

List reactions for a post.

GET /api/posts/{id}/reactions
Path parameters
id integer required

Post id.

Query parameters
content string

Lists reactions with the specified emoji character. Omit this parameter to list all reactions.

q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

skip integer

The number of items to skip. Used together with top to return a specific range of items (for pagination).

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Example request
curl https://{WEAVY-SERVER}/api/posts/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "integer",
      "content": "string",
      "created_at": "string",
      "created_by_id": "integer",
      "count": "integer"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

List comment reactions

List reactions for a comment.

GET /api/comments/{id}/reactions
Path parameters
id integer required

Comment id.

Query parameters
content string

Lists reactions with the specified emoji character. Omit this parameter to list all reactions.

q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

skip integer

The number of items to skip. Used together with top to return a specific range of items (for pagination).

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Example request
curl https://{WEAVY-SERVER}/api/comments/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "integer",
      "content": "string",
      "created_at": "string",
      "created_by_id": "integer",
      "count": "integer"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

List message reactions

List reactions for a message.

GET /api/messages/{id}/reactions
Path parameters
id integer required

Message id.

Query parameters
content string

Lists reactions with the specified emoji character. Omit this parameter to list all reactions.

q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

skip integer

The number of items to skip. Used together with top to return a specific range of items (for pagination).

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Example request
curl https://{WEAVY-SERVER}/api/messages/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

200 Success
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "integer",
      "content": "string",
      "created_at": "string",
      "created_by_id": "integer",
      "count": "integer"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

Unreact to post

Delete authenticated user's reaction to a post.

DELETE /api/posts/{id}/reactions
Path parameters
id integer required

Post id.

Example request
curl -X DELETE https://{WEAVY_SERVER}/api/posts/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Unreact to comment

Delete authenticated user's reaction to a comment.

DELETE /api/comments/{id}/reactions
Path parameters
id integer required

Comment id.

Example request
curl -X DELETE https://{WEAVY_SERVER}/api/comments/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Unreact to message

Delete authenticated user's reaction to a message.

DELETE /api/messages/{id}/reactions
Path parameters
id integer required

Message id.

Example request
curl -X DELETE https://{WEAVY_SERVER}/api/messages/1/reactions
-H "Authorization: Bearer {ACCESS-TOKEN}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Delete reaction

Delete a reaction.

DELETE /api/reactions/{id}
Path parameters
id integer required

Reaction id.

Example request
curl -X DELETE https://{WEAVY_SERVER}/api/reactions/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found