Create Task API | WeGoDoo Help

Create Task API

This API allows you to create a new task in a specified list.

API Endpoint

POST /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


Headers

  • AccessToken: <Your_API_Key>

Request Body

JSON payload:

Notes
{
"list_id": "12345",
"task_name": "Prepare Presentation for Quarterly Review",
"note": "Include key performance indicators and future goals",
"due_date": "2024-12-01",
"reminder_time": "09:30",
"comment": "Draft needs to be shared with the team by EOD.",
"mark_as_important": true,
"assigned_to": "jane.smith@example.com",
"verify_by": "john.doe@example.com",
"IsDoingToday": true
}

Required Fields

  • task_name (String): The name of the task to be created.

Optional Fields

  • list_id (long, optional): The ID of the list in which the task will be created. (Available in the Get Lists API response.) Leave it out, or send "0", to add the task to your Inbox.
  • note (String): A note about the task.
  • due_date (Datetime): The due date for the task in Format: "YYYY-MM-DD" (e.g., "2024-12-01")
  • reminder_time (String, optional): The time of the reminder, in your account's time zone. Format: "HH:MM" (24-hour format). If you don't send a due_date, the reminder goes on today, or tomorrow if that time has already passed.
  • IsDoingToday (Boolean): Indicates whether the task is scheduled for today.
  • mark_as_important (Boolean): Marks the task as important if set to true.
  • assigned_to (String): The email ID of the user to whom the task is assigned.
  • verify_by (String): The email ID of the user responsible for verifying the task.
  • comment (String): Additional comments or instructions related to the task.

Response

The API responds with a JSON object containing the following fields:

Notes
{
"status": "success",
"message": "Task successfully created.",
"data": {
"task_id": "112233",
"list_id": "12345",
"task_name": "Prepare Presentation for Quarterly Review",
        "task_url": "https://app.wegodoo.com/Home/Index?taskid=Ij90YXNraWQ9ODcxNDYmbGlzdGlkPTE5MTE4Ig==",
"list_name": "Team Objectives",
"note": "Include key performance indicators and future goals",
"due_date": "2024-12-01",
"ReminderTime": "09:30",
"comment": "Draft needs to be shared with the team by EOD.",
"mark_as_important": true,
"assigned_to": "jane.smith@example.com",
"verify_by": "john.doe@example.com",
"IsDoingToday": true
}
}

API Error Handling

403 Forbidden

User is not a member of the list

Notes
{
"status": "error",
"message": "User is not member of the list",
"errors": {
"authorization": "Provided assigned_to or verify_by user ID is not available"
}
}

Assign to or verify by user is not valid

Notes
{
"status": "error",
"message": "User not valid",
"errors": {
"user_validation": "The 'assigned_to' or 'verify_by' user is not valid"
}
}

User does not have rights to create task

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

List is not a Shared List

Notes
{
"status": "error",
"message": "List not shared",
"errors": {
"list_type": "List is not a shared list. You cannot add 'assigned_to' and 'verify_by'."
}
}

400 Bad Request

Same user allotted in assigned_to and verify_by fields

Notes
{
"status": "error",
"message": "Bad Request",
"errors": {
"error": "You can't pass the same user into assigned_to and verify_by."
}
}

Task Name is not provided in request body


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

Invalid Due Date


Notes
{
"status": "error",
"message": "Bad Request",
"errors": {
"due_date": "Invalid Due Date"
}
}


404 Not Found

List Id does not exist


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


400 Bad Request


Notes
{
"status": "error",
"message": "Bad Request",
"errors": {
"request_body": "Request body is required"
}
}


429 Too Many Requests

Task creation limit reached for Free Plan


Notes
{
"status": "error",
"message": "Task creation limit reached for your current plan.",
"errors": {
"rate_limit": "You have exceeded the maximum number of tasks (100) for a list on a free plan. Please upgrade to create more tasks."
}
}

Task creation limit reached for Pro Plan


Notes
{
"status": "error",
"message": "Task creation limit reached for your current plan.",
"errors": {
"rate_limit": "You have exceeded the maximum number of tasks (500) for a list on your current plan. To create more tasks, consider organizing your work into multiple lists."
}
}


401 Unauthorized

Invalid token


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