Update Task API | WeGoDoo Help

Update Task API

This API allows you to update an existing task in a specified list.

API URL

https://app.wegodoo.com/


API Endpoint

PUT /api/v1/tasks


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

JSON payload:

{
"task_id": "61948",
"update_task_name": "Update Website Content",
"update_note": "Ensure all pages are updated with the new branding",
"update_due_date": "2024-03-11",
"set_mark_as_important": true,
"IsDoingToday": true
}

Only the fields you send are changed. Anything you leave out keeps its value.

Required Fields

  • task_id (long): The ID of the task to be updated.
  • update_task_name (String): The new name for the task.

Optional Fields

  • update_note (String): A note or additional information about the task.
  • update_due_date (Datetime): The updated due date for the task in Format: "YYYY-MM-DD" (e.g., "2024-12-01").
  • IsDoingToday (Boolean): Whether the task is scheduled for today.
  • set_mark_as_important (Boolean): Whether the task is marked as important.
  • reminder_time (String): The time of the reminder, in your account's time zone. Format: "HH:MM" (24-hour format). If the task has no due date, the reminder goes on today, or tomorrow if that time has already passed.

Headers

  • AccessToken: <Your_API_Key>

Response

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

{
"status": "success",
"message": "Task successfully updated.",
"data": {
"task_id": "61948",
"list_id": "7998",
"task_name": "Update Website Content",
       "task_url": "https://app.wegodoo.com/Home/Index?taskid=Ij90YXNraWQ9ODcxNDYmbGlzdGlkPTE5MTE4Ig==",
"list_name": "Marketing Tasks",
"note": "Ensure all pages are updated with the new branding",
"due_date": "2024-03-11",
"mark_as_important": true,
"assigned_to": null,
"verify_by": null,
"IsDoingToday": true
}
}

API Error Handling

HTTP Status Code: 404 Not Found

 ‘List Id’ provided in the request body doesn’t exist

{
"status": "error",
"message": "Not Found",
"errors": {
"list_id": "The specified List ID does not exist"
}
}

Task Id provided in the request body doesn’t exist

{
"status": "error",
"message": "Not Found",
"errors": {
"task_id": "The specified Task ID does not exist"
}
}

400 Bad Request

Request body not provided

{
"status": "error",
"message": "Bad Request",
"errors": {
"task_id": "Task ID is required",
"task_name": "Task Name is required"
}
}

Task Id is not provided in the request body

{
"status": "error",
"message": "Bad Request",
"errors": {
"task_id": "Task ID is required"
}
}

Task Id not matching with URL Task Id

{
"status": "error",
"message": "Bad Request",
"errors": {
"task_id": "URL task_id and Model task_id is not same."
}
}

403 Forbidden

You don't have rights on the task, or on the list in list_id

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

400 Bad Request

list_id is not a number

{
  "status": "error",
  "message": "Bad Request",
  "errors": {
    "list_id": "list_id must be a number"
  }
}

401 Unauthorized

Invalid token

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