For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDeveloper ForumLogin
  • Overview
    • Introduction
    • Getting Started
    • Integration Example (PSA)
    • Authentication
    • Error Handling
    • Pagination
    • Filtering
    • Ordering
    • Rate Limits
    • Permissions
    • Webhooks
    • MCP Server
    • Versioning
    • Changelog
    • Support
  • API v1 Reference
    • Projects Overview
    • Tasks Overview
    • Time Tracking Overview
    • Documents Overview
      • GETReturns all comments of the document with the specified id.
      • POSTCreates a new comment on the document with the specified id.
      • DELDeletes all comments of the specified document.
      • GETReturns the comment with the specified id of the document with the specified id.
      • PUTUpdates the comment with the specified id on the document with the specified id.
      • DELDeletes the comment with the specified id on the document with the specified id.
      • POSTUpdates the reactions of the comment with the specified id on the document with the specified id.
      • POSTSets the resolved status of a comment.
    • Search Overview
    • Companies Overview
    • Users Overview
    • Files & Images Overview
    • Custom Fields Overview
    • Workload & Planning Overview
    • Project Templates Overview
    • Workflows Overview
    • Login & Access Overview
    • API Management Overview
LogoLogo
SupportDeveloper ForumLogin
API v1 ReferenceDocument Comments

Creates a new comment on the document with the specified id.

POST
https://api.awork.com/api/v1/documents/:documentId/comments
POST
/api/v1/documents/:documentId/comments
$curl -X POST https://api.awork.com/api/v1/documents/documentId/comments \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "message": "Hey team, the customer loved the latest designs!"
>}'
1{
2 "id": "a3f1c9d2-4b7e-4f8a-9c3d-2e5b7f9a1c2d",
3 "entityId": "b7d9e8f1-2c3a-4d5e-8f7b-9a0c1d2e3f4b",
4 "entityType": "tasks",
5 "entity": {
6 "id": "b7d9e8f1-2c3a-4d5e-8f7b-9a0c1d2e3f4b",
7 "name": "Design Review Task"
8 },
9 "project": {
10 "id": "c1d2e3f4-b5a6-7c8d-9e0f-1a2b3c4d5e6f",
11 "name": "Website Redesign Project"
12 },
13 "task": {
14 "id": "b7d9e8f1-2c3a-4d5e-8f7b-9a0c1d2e3f4b",
15 "name": "Review New UI Mockups"
16 },
17 "document": {
18 "id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a",
19 "name": "UI Design Specifications"
20 },
21 "createdOn": "2024-01-15T09:30:00Z",
22 "createdBy": "e1f2a3b4-c5d6-7e8f-9012-3456789abcde",
23 "user": {
24 "id": "e1f2a3b4-c5d6-7e8f-9012-3456789abcde",
25 "firstName": "Carla",
26 "lastName": "Creative",
27 "hasImage": true,
28 "isExternal": false
29 },
30 "updatedOn": "2024-01-15T09:30:00Z",
31 "updatedBy": "e1f2a3b4-c5d6-7e8f-9012-3456789abcde",
32 "mentions": {
33 "users": [
34 {
35 "id": "f9e8d7c6-b5a4-3210-9fed-cba987654321",
36 "firstName": "Mark",
37 "lastName": "Manager",
38 "hasImage": true,
39 "isExternal": false
40 }
41 ],
42 "everyUserHadPermissions": true
43 },
44 "reactions": [
45 {
46 "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
47 "emoji": "👍"
48 }
49 ],
50 "formattedMessage": "Hey team, the customer loved the latest designs!",
51 "plainFormattedMessage": "Hey team, the customer loved the latest designs!",
52 "resourceVersion": 637825154598057900,
53 "message": "Hey team, the customer loved the latest designs!",
54 "userId": "e1f2a3b4-c5d6-7e8f-9012-3456789abcde",
55 "previews": [
56 "https://www.awork.com/en/blog/automatic-project-management/"
57 ],
58 "isHiddenForConnectUsers": false,
59 "isResolved": true,
60 "inReplyToCommentId": "a9b8c7d6-e5f4-3210-9abc-def123456789"
61}
Creates a new comment on the document with the specified id. A user can only create a comment for him/herself, except for admins and api users. <Check title="Required Permissions" icon="key">To create a comment the user must have at least `read` permissions on the specified document.</Check>
Was this page helpful?
Previous

Deletes all comments of the specified document.

Next
Built with

Creates a new comment on the document with the specified id. A user can only create a comment for him/herself, except for admins and api users.

Required Permissions
To create a comment the user must have at least read permissions on the specified document.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

documentIdstringRequiredformat: "uuid"
The id of the document to create the comment for.

Request

The model to create the comment.
messagestringRequired1-65000 characters
The message of the comment.
userIdstring or nullOptionalformat: "uuid"
The id of the user who created the comment. Optional. If not set, defaults to the current user.
previewslist of strings or nullOptional
The preview URLs to show a preview for.
isHiddenForConnectUsersboolean or nullOptional

(optional) Whether the comment is hidden for connect users. Providing a null value will not change the current state. By default, comments are not hidden for connect users.

isResolvedboolean or nullOptional
Whether the comment has been resolved. Only available for comments on documents.
inReplyToCommentIdstring or nullOptionalformat: "uuid"
The parent comment this comment is a reply to.

Response

OK
idstringformat: "uuid"
The id of the comment.
entityIdstringformat: "uuid"
The id of the entity of the comment. Required.
entityTypestring or null
The type of the entity of the comment. Can be "projects", "tasks". Required.
entityobject
projectobject
taskobject
documentobject
createdOnstringformat: "date-time"
The date this object was created.
createdBystringformat: "uuid"
The id of the user who created this object.
userobject
updatedOnstringformat: "date-time"
The date this object was last modified.
updatedBystringformat: "uuid"
The id of the user who last modified this object.
mentionsobject
A mention is the tag of a user on a specific comment, so the user is notified.
reactionslist of objects or null
The reactions on a comment.
formattedMessagestring or null
The formatted and proccessed version of the comment message. E.g. mentions are in a human readable format. The formatted comment message is styled with html.
plainFormattedMessagestring or null
The formatted and proccessed version of the comment message. E.g. mentions are in a human readable format. The formatted comment message is not styled.
resourceVersionlongRead-only
The version of the entity, updated on every modification, to the ticks in UTC. Not identical to UpdatedOn.
messagestring or null
The message of the comment.
userIdstring or nullformat: "uuid"
The id of the user who created the comment. Optional. If not set, defaults to the current user.
previewslist of strings or null
The preview URLs to show a preview for.
isHiddenForConnectUsersboolean
True if the comment should be hidden to connect users.
isResolvedboolean or null
Whether the comment has been resolved. Only available for comments on documents.
inReplyToCommentIdstring or nullformat: "uuid"
The parent comment this comment is a reply to.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error