Comments

The Comments API supports managing comments.

Create app comment

Creates a new comment in the specified Comments app.

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

App id

Body parameters
blobs array of integers

Ids of blobs to attach.

embed_id integer

Id of embed to attach.

meeting_id integer

Id of meeting to attach.

options array of objects

List of poll options to attach.

text string

The message text.

metadata object

Additional metadata properties, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the item.

Response codes

200 Success

{
  "id": "integer",
  "app_id": "integer",
  "text": "string",
  "html": "string",
  "plain": "string",
  "attachment_count": "integer",
  "attachments": [
    "object"
  ],
  "embed_id": "integer",
  "meeting_id": "integer",
  "option_count": "integer",
  "options": [
    "object"
  ],
  "reactions": [
    "object"
  ],
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_trashed": "boolean"
}
Code sample
curl https://{WEAVY-SERVER}/api/apps/1/comments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
-H "Content-Type: application/json"
-d "{ 'text': 'This is a comment' }"

List app comments

List comments in the specified Comments app.

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

App id.

Query parameters
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 0 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 boolean

false to skip counting the total number of matching items; default is true.

count_only boolean

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

Response codes

200 Success

{
  "data": [
    "object"
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/apps/1/comments?top=20
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Create file comment

Creates a new comment on the specified file.

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

File id

Body parameters
blobs array of integers

Ids of blobs to attach.

embed_id integer

Id of embed to attach.

meeting_id integer

Id of meeting to attach.

options array of objects

List of poll options to attach.

text string

The message text.

metadata object

Additional metadata properties, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the item.

Response codes

200 Success

{
  "id": "integer",
  "app_id": "integer",
  "text": "string",
  "html": "string",
  "plain": "string",
  "attachment_count": "integer",
  "attachments": [
    "object"
  ],
  "embed_id": "integer",
  "meeting_id": "integer",
  "option_count": "integer",
  "options": [
    "object"
  ],
  "reactions": [
    "object"
  ],
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_trashed": "boolean"
}
Code sample
curl https://{WEAVY-SERVER}/api/files/1/comments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
-H "Content-Type: application/json"
-d "{ 'text': 'This is a comment on a file' }"

List file comments

List comments on the specified file.

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

File id.

Query parameters
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 0 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 boolean

false to skip counting the total number of matching items; default is true.

count_only boolean

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

Response codes

200 Success

{
  "data": [
    "object"
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/files/1/comments?top=20
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Create post comment

Creates a new comment on the specified post.

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

Post id

Body parameters
blobs array of integers

Ids of blobs to attach.

embed_id integer

Id of embed to attach.

meeting_id integer

Id of meeting to attach.

options array of objects

List of poll options to attach.

text string

The message text.

metadata object

Additional metadata properties, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the item.

Response codes

200 Success

{
  "id": "integer",
  "app_id": "integer",
  "text": "string",
  "html": "string",
  "plain": "string",
  "attachment_count": "integer",
  "attachments": [
    "object"
  ],
  "embed_id": "integer",
  "meeting_id": "integer",
  "option_count": "integer",
  "options": [
    "object"
  ],
  "reactions": [
    "object"
  ],
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_trashed": "boolean"
}
Code sample
curl https://{WEAVY-SERVER}/api/posts/1/comments
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
-H "Content-Type: application/json"
-d "{ 'text': 'This is a comment on a post' }"

List post comments

List comments on the specified post.

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

Post id.

Query parameters
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 0 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 boolean

false to skip counting the total number of matching items; default is true.

count_only boolean

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

Response codes

200 Success

{
  "data": [
    "object"
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/posts/1/comments?top=20
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Get comment

Gets a comment by id.

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

Id of the comment.

Query parameters
trashed boolean

true to return comment even if trashed, otherwise false.

Response codes

200 Success

{
  "id": "integer",
  "app_id": "integer",
  "text": "string",
  "html": "string",
  "plain": "string",
  "attachment_count": "integer",
  "attachments": [
    "object"
  ],
  "embed_id": "integer",
  "meeting_id": "integer",
  "option_count": "integer",
  "options": [
    "object"
  ],
  "reactions": [
    "object"
  ],
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_trashed": "boolean"
}
Code sample
curl https://{WEAVY-SERVER}/api/comments/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Update comment

Updates a comment.

PATCH /api/comments/{id}
Path parameters
id integer required

Id of the comment.

Body parameters
attachments array of integers

Ids of attached files.

blobs array of integers

Ids of additional blobs to attach.

embed_id integer

Id of embed to attach.

meeting_id integer

Id of meeting to attach.

options array of objects

List of poll options for the item.

text string

The message text.

metadata object

Additional metadata properties, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the item.

Response codes

204 No Content

404 Not Found

400 Bad Request

Code sample
$ curl -X PATCH {WEAVY_SERVER}/api/comments/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
-H "Content-Type: application/json"
-d "{'text': 'Update comment text' }"

Delete comment

Delete a comment.

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

Id of the comment.

Response codes

204 No Content

Code sample
$ curl -X DELETE {WEAVY_SERVER}/api/comments/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Trash comment

Move a comment to the trash.

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

Id of the comment to trash.

Response codes

200 Success

{
  "id": "integer",
  "app_id": "integer",
  "text": "string",
  "html": "string",
  "plain": "string",
  "attachment_count": "integer",
  "attachments": [
    "object"
  ],
  "embed_id": "integer",
  "meeting_id": "integer",
  "option_count": "integer",
  "options": [
    "object"
  ],
  "reactions": [
    "object"
  ],
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_trashed": "boolean"
}

404 Not Found

400 Bad Request

Code sample
$ curl -X POST {WEAVY_SERVER}/api/comments/1/trash
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Restore comment

Restore a comment from the trash.

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

Id of the comment to restore.

Response codes

200 Success

{
  "id": "integer",
  "app_id": "integer",
  "text": "string",
  "html": "string",
  "plain": "string",
  "attachment_count": "integer",
  "attachments": [
    "object"
  ],
  "embed_id": "integer",
  "meeting_id": "integer",
  "option_count": "integer",
  "options": [
    "object"
  ],
  "reactions": [
    "object"
  ],
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_trashed": "boolean"
}
Code sample
$ curl -X POST {WEAVY_SERVER}/api/comments/1/restore
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Indicate typing (file)

Indicate that the authenticated user is commenting on a file.

PUT /api/files/{id}/comments/typing
Path parameters
id integer required

File id.

Response codes

204 No Content

Code sample
$ curl -X PUT {WEAVY_SERVER}/api/files/1/comments/typing
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Indicate typing (post)

Indicate that the authenticated user is commenting on a post.

PUT /api/posts/{id}/comments/typing
Path parameters
id integer required

Post id.

Response codes

204 No Content

Code sample
$ curl -X PUT {WEAVY_SERVER}/api/posts/1/comments/typing
-H "Authorization: Bearer {ACCESS-TOKEN}"
Weavy Docs