Add Task Comment API | WeGoDoo Help

Add Task Comment API

This API allows you to add a comment to a specific task in a specified list.

API Endpoint

POST /api/v1/tasks/comments


Info
## Important Notes:
- All API requests must be made to this base URL followed by the specific endpoint path
- HTTPS protocol is required for all API calls
- API version v1 is currently supported
- All responses will be returned in JSON format


Request Body


Notes

JSON payload:

{
"task_id": "60965",
"Comment": "This task requires additional clarification."
}


Required Fields

  • task_id (long): The ID of the task to which the comment will be added. (Available in the Get Lists API response.)
  • Comment (String): The comment to be added to the task.

Headers

  • AccessToken: <Your_API_Key>

Response

The API will respond with a JSON object containing the following fields:

Notes
{
"status": "success",
"message": "Task was found and comment was added.",
"data": {
"task_id": "60965",
"task_name": "Good evening",
"comment": "This task requires additional clarification.",
}
}

API Error Handling

403 Forbidden

User does not have permission to the list and add a comment on the task

Notes
{
"status": "error",
"message": "User does not have permission",
"errors": {
"authorization": "User does not have the rights to update this task"
}
}

404 Not Found

Task ID does not exist

Notes
{
"status": "error",
"message": "Bad Request",
"errors": {
"task_id": "The specified Task ID does not exist"
}
}

List ID does not exist

Notes
{
"status": "error",
"message": "Bad Request",
"errors": {
"list_id": "The specified List ID does not exist"
}
}

400 Bad Request

Comment not provided in the request body

Notes
{
"status": "error",
"message": "Bad Request",
"errors": {
"comment": "Comment is required"
}
}

Request body not provided

Notes
{
"status": "error",
"message": "Bad Request",
"errors": {
"list_id": "List ID is required",
"task_id": "Task ID is required",
"comment": "Comment is required"
}
}

401 Unauthorized

Invalid Token

Notes
{
"status": "error",
"message": "Unauthorized",
"errors": {
"authorization": "Token is invalid or expired"
}
}