Comment & Mention Endpoints
Manage comments, @mentions, and reactions on entities (tasks, projects, etc.).
Base Pathsβ
| Resource | Path |
|---|---|
| Comments | /api/comment |
| Mentions | /api/mention |
| Reactions | /api/reaction |
Comment Endpointsβ
List Commentsβ
GET /api/comment
Authorization: Bearer {token}
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
entity | string | Entity type (e.g., Task, Project) |
entityId | string | ID of the parent entity |
relations | array | Relations to include |
Get Comment by IDβ
GET /api/comment/:id
Authorization: Bearer {token}
Create Commentβ
POST /api/comment
Authorization: Bearer {token}
Content-Type: application/json
{
"entity": "Task",
"entityId": "task-uuid",
"comment": "This looks great! Let's proceed with the implementation.",
"members": ["employee-uuid-1"],
"parentId": null
}
Response 201 Created.
Update Commentβ
PUT /api/comment/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"comment": "Updated comment text",
"editedAt": "2024-03-15T10:00:00.000Z"
}
Delete Commentβ
DELETE /api/comment/:id
Authorization: Bearer {token}
Mention Endpointsβ
List Mentionsβ
GET /api/mention
Authorization: Bearer {token}
Create Mentionβ
POST /api/mention
Authorization: Bearer {token}
Content-Type: application/json
{
"entityId": "comment-uuid",
"entity": "Comment",
"mentionedUserId": "user-uuid"
}
Reaction Endpointsβ
List Reactionsβ
GET /api/reaction
Authorization: Bearer {token}
Add Reactionβ
POST /api/reaction
Authorization: Bearer {token}
Content-Type: application/json
{
"entity": "Comment",
"entityId": "comment-uuid",
"emoji": "π"
}
Remove Reactionβ
DELETE /api/reaction/:id
Authorization: Bearer {token}
Data Modelβ
interface IComment {
id: string;
entity: string;
entityId: string;
comment: string;
actorType?: ActorTypeEnum;
resolved?: boolean;
resolvedAt?: Date;
editedAt?: Date;
// Relations
parentId?: string;
parent?: IComment;
replies?: IComment[];
members?: IEmployee[];
creatorId?: string;
tenantId: string;
organizationId: string;
}
interface IMention {
id: string;
entityId: string;
entity: string;
mentionedUserId: string;
mentionById?: string;
parentEntityId?: string;
parentEntityType?: string;
}
interface IReaction {
id: string;
entity: string;
entityId: string;
emoji: string;
creatorId: string;
}
Related Pagesβ
- Comments & Mentions Feature β feature guide
- Reactions Feature β emoji reactions
- Task Endpoints β tasks with comments