This API allows you to create a new task in a specified list.
API URL
API Endpoint
POST /api/v1/tasks
## 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:
{
"list_id": "12345",
"task_name": "Prepare Presentation for Quarterly Review",
"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
}
Required Fields
- list_id (long): The ID of the list in which the task will be created. (Available in the Get Lists API response).
- task_name (String): The name of the task to be created.
Optional Fields
- 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")
- ReminderTime (String, optional): The time to remind users about the task. Format: "HH:MM" (24-hour format).
- 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.
Response
The API responds with a JSON object containing the following fields:
{
"status": "success",
"message": "Task successfully created.",
"data": {
"task_id": "112233",
"list_id": "12345",
"task_name": "Prepare Presentation for Quarterly Review",
"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
{ "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
{ "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
{ "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
{ "status": "error", "message": "Unauthorized", "errors": { "authorization": "List is not a SharedList, you cannot add verify_by and assigned_to user" } }
400 Bad Request
Same user allotted in assigned_to and verify_by fields
{ "status": "error", "message": "Bad Request", "errors": { "error": "You can't pass the same user into assigned_to and verify_by." } }
List Id is not provided in request body
{ "status": "error", "message": "Bad Request", "errors": { "list_id": "List ID is required" } }
Task Name is not provided in request body
{
"status": "error",
"message": "Bad Request",
"errors": {
"task_name": "Task Name is required"
}
}
Invalid Due Date
{
"status": "error",
"message": "Bad Request",
"errors": {
"due_date": "Invalid Due Date"
}
}
404 Not Found
List Id does not exist
{
"status": "error",
"message": "Not Found",
"errors": {
"list_id": "The specified list ID does not exist"
}
}
400 Bad Request
{
"status": "error",
"message": "Bad Request",
"errors": {
"request_body": "Request body is required"
}
}
429 Too Many Requests
Task creation limit reached for Free Plan
{
"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
{
"status": "error",
"message": "Task creation limit reached for your current plan.",
"errors": {
"rate_limit": "You have exceeded the maximum number of tasks (300) for a list on your current plan. To create more tasks, consider organizing your work into multiple lists."
}
}
401 Unauthorized
Invalid token
{ "status": "error", "message": "Unauthorized", "errors": { "authorization": "Token is invalid or expired" } }