Skip to main content

Add Task Comment (v1)

Method + Path

POST /v1/workspace/staff/:staffId/tasks/:taskId/comments

Actual backend path: /v1/workspace/staff/:staffId/tasks/:taskId/comments

Description

Add a comment to a task.

Authentication

Required - JWT token in Authorization header

Required Permissions:

  • staff.view or task-related permissions

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
staffIdstringYesStaff member identifier
taskIdstringYesTask identifier

Request Body

{
"authorId": "507f1f77bcf86cd799439012",
"authorType": "staff",
"authorName": "John Doe",
"authorAvatarUrl": "https://example.com/avatar.jpg",
"body": "This task is progressing well. Should be completed by end of week."
}

Body Parameters

ParameterTypeRequiredDescription
authorIdstringYesID of the comment author
authorTypestringYesType of author. Valid values: staff, workspace
authorNamestringYesName of the comment author (minimum 1 character)
authorAvatarUrlstringNoURL to author's avatar image
bodystringYesComment text (minimum 1 character)

Response (201)

{
"comment": {
"id": "507f1f77bcf86cd799439013",
"authorId": "507f1f77bcf86cd799439012",
"authorType": "staff",
"authorName": "John Doe",
"authorAvatarUrl": "https://example.com/avatar.jpg",
"body": "This task is progressing well. Should be completed by end of week.",
"createdAt": "2024-01-15T11:00:00Z"
}
}

Common Errors

  • 400 Bad Request: Invalid request body
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Task or staff member not found
  • 422 Unprocessable Entity: Validation errors
  • 500 Internal Server Error: Server error