SupportDeveloper ForumLogin
  • Overview
    • Introduction
    • Getting Started
    • 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
    • Search Overview
    • Companies Overview
    • Users Overview
    • Files & Images Overview
    • Custom Fields Overview
    • Workload & Planning Overview
    • Project Templates Overview
    • Login & Access Overview
    • API Management Overview
LogoLogo
SupportDeveloper ForumLogin
API v1 ReferenceTask Comments

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

POST
https://api.awork.com/api/v1/tasks/:taskId/comments
POST
/api/v1/tasks/:taskId/comments
1curl -X POST https://api.awork.com/api/v1/tasks/taskId/comments \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "message": "Hey team, the customer loved the latest designs!"
6}'
Try it
200Successful
1{
2 "id": "123e4567-e89b-12d3-a456-426614174000",
3 "entityId": "123e4567-e89b-12d3-a456-426614174000",
4 "entityType": "tasks",
5 "entity": {
6 "id": "123e4567-e89b-12d3-a456-426614174000",
7 "name": "string"
8 },
9 "project": {
10 "id": "123e4567-e89b-12d3-a456-426614174000",
11 "name": "string"
12 },
13 "task": {
14 "id": "123e4567-e89b-12d3-a456-426614174000",
15 "name": "string"
16 },
17 "document": {
18 "id": "123e4567-e89b-12d3-a456-426614174000",
19 "name": "string"
20 },
21 "createdOn": "2024-01-15T09:30:00Z",
22 "createdBy": "123e4567-e89b-12d3-a456-426614174000",
23 "user": {
24 "id": "123e4567-e89b-12d3-a456-426614174000",
25 "firstName": "string",
26 "lastName": "string",
27 "hasImage": true,
28 "isExternal": true
29 },
30 "updatedOn": "2024-01-15T09:30:00Z",
31 "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
32 "mentions": {
33 "users": [
34 {
35 "id": "123e4567-e89b-12d3-a456-426614174000",
36 "firstName": "string",
37 "lastName": "string",
38 "hasImage": true,
39 "isExternal": true
40 }
41 ],
42 "everyUserHadPermissions": true
43 },
44 "reactions": [
45 {
46 "userId": "123e4567-e89b-12d3-a456-426614174000",
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": "123e4567-e89b-12d3-a456-426614174000",
55 "previews": [
56 "https://www.awork.com/en/blog/automatic-project-management/"
57 ],
58 "isHiddenForConnectUsers": true,
59 "isResolved": true,
60 "inReplyToCommentId": "123e4567-e89b-12d3-a456-426614174000"
61}
Creates a new comment on the task with the specified id. The user needs read permissions on the task to create a comment. A user can only create a comment for him/herself, except for admins and api users.
Was this page helpful?
Previous

Deletes all comments of the specified task.

Next
Built with
Deletes all comments of the specified task.

Authentication

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

Path parameters

taskIdstringRequiredformat: "uuid"
The id of the task.

Request

The model used to create a comment.
messagestringRequired>=1 character<=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
idstring or nullformat: "uuid"
The id of the comment.
entityIdstring or nullformat: "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 or null
projectobject or null
taskobject or null
documentobject or null
createdOnstring or nullformat: "date-time"
The date this object was created.
createdBystring or nullformat: "uuid"
The id of the user who created this object.
userobject or null
updatedOnstring or nullformat: "date-time"
The date this object was last modified.
updatedBystring or nullformat: "uuid"
The id of the user who last modified this object.
mentionsobject or null
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.
resourceVersionlong or null
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 or null
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.
The id of the task.

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

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

Creates a new comment on the task with the specified id. The user needs read permissions on the task to create a comment. A user can only create a comment for him/herself, except for admins and api users.