Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Ajith66310/task-manager-full/llms.txt

Use this file to discover all available pages before exploring further.

Tasks are the core unit of work in TaskFlow. Each task belongs to a single user, carries a status and priority, and can optionally have a due date. This page explains the task data model, the full lifecycle from creation to completion, and how to query and paginate your task list.

Task data model

Every task stored in TaskFlow has the following fields:
FieldTypeConstraintsDefault
titlestringRequired. 3–100 characters.
descriptionstringOptional. Max 1,000 characters.""
statusstringOne of pending, in-progress, completed.pending
prioritystringOne of low, medium, high.medium
dueDatedateOptional. ISO 8601 format (e.g. 2025-12-31).null
isVerifiedByAdminbooleantrue by default. Set to false when a task is submitted for admin review.true
isOverduebooleanVirtual field — read-only, not stored.computed

Status values

ValueMeaning
pendingTask has been created but work has not begun
in-progressWork is actively underway
completedTask is finished and can no longer be edited

Priority values

ValueMeaning
lowNon-urgent, can be addressed later
mediumStandard priority (default)
highUrgent, should be addressed promptly

The isOverdue virtual field

isOverdue is computed at read time and is never persisted to the database. It returns true when all of the following are true:
  • The task has a dueDate set.
  • The current time is past that date.
  • The task status is not completed.
Because isOverdue is a virtual field, you cannot filter tasks by it via query parameters. Use the dueDate and status filters together to achieve the same result.

Creating a task

Send a POST request to /api/tasks with the task details in the request body.
POST /api/tasks
Authorization: Bearer <token>
Content-Type: application/json
{
  "title": "Write quarterly report",
  "description": "Compile metrics and prepare slides for Q3.",
  "priority": "high",
  "dueDate": "2025-09-30T00:00:00.000Z"
}
title is the only required field. All other fields are optional and fall back to their defaults.
You must be a verified user to create tasks. Unverified accounts receive a 403 Forbidden response. Contact your admin to get your account verified.

Updating a task

Send a PUT request to /api/tasks/:id to modify an existing task. All body fields are optional — include only the fields you want to change.
PUT /api/tasks/:id
Authorization: Bearer <token>
Content-Type: application/json
{
  "status": "in-progress",
  "priority": "medium"
}
Completed tasks cannot be modified. Attempting to update a task whose status is completed returns 403 Forbidden.
When an admin updates a task, the isVerifiedByAdmin flag is automatically set to true on the updated record.

Retrieving tasks

List all tasks

GET /api/tasks
Authorization: Bearer <token>
Regular users see only their own tasks. Admins see all tasks across every user.

Filter and paginate

Append any combination of the following query parameters:
ParameterTypeAllowed valuesDefault
statusstringpending, in-progress, completed
prioritystringlow, medium, high
pageintegerAny positive integer1
limitinteger1–10010
sortBystringcreatedAt, updatedAt, dueDate, priority, titlecreatedAt
orderstringasc, descdesc
Example — high-priority pending tasks, newest first:
GET /api/tasks?status=pending&priority=high&sortBy=createdAt&order=desc&page=1&limit=20
The response includes a meta object with pagination details:
{
  "data": [...],
  "meta": {
    "total": 42,
    "page": 1,
    "limit": 20,
    "totalPages": 3
  }
}

Fetch a single task

GET /api/tasks/:id
Authorization: Bearer <token>
Users can only retrieve tasks they own. Admins can retrieve any task.

Deleting a task

DELETE /api/tasks/:id
Authorization: Bearer <token>
Users can delete their own tasks. Admins can delete any task.

Task verification

All tasks are created with isVerifiedByAdmin: true by default. A task only appears in the admin’s pending queue (GET /api/admin/tasks/pending) when isVerifiedByAdmin is explicitly set to false. Admin-assigned tasks are always created with isVerifiedByAdmin: true and bypass the pending queue entirely.

Build docs developers (and LLMs) love