The Tasks API is the backbone of MindFlow’s academic workload management. It lets authenticated students create tasks with deadlines, update or soft-delete them, and interact with the AI-generated micro-objectives that are produced automatically when high fatigue is detected. Every write operation is ownership-checked against the JWT — a student can only read and modify their own tasks.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/J0S3-LEON/pf_pruebasAseguramientoCalid_SDD/llms.txt
Use this file to discover all available pages before exploring further.
All endpoints in this group require a valid JWT Bearer token in the
Authorization header. Requests without a valid token receive 401 Unauthorized. Expired tokens are also rejected with 401.GET /api/v1/tasks
Returns all active (non-deleted) tasks belonging to the authenticated student, sorted ascending by deadline. The response includes each task’s nested micro-objectives (whereis_audit_only = false), so a single call is sufficient to populate a full task list view.
Authentication: JWT Bearer
Response
Array of Task objects sorted by
deadline ascending. Each task includes its active micro-objectives nested under microObjectives.Always
null on success.200Example Response
Only the authenticated student’s own tasks are returned. Tasks belonging to other students are never included — the query is scoped to the JWT’s
studentId at the database level.POST /api/v1/tasks
Creates a new academic task for the authenticated student. On success the server returns the persisted task record with its assigned UUID. Authentication: JWT BearerRequest Body
The task name. Cannot be empty. Maximum 255 characters.
Optional free-text description of the task.
Task deadline as an ISO 8601 UTC datetime string, e.g.
2025-08-01T23:59:00Z. The server converts this to a UTC Date internally.Example Request
Response — 201 Created
The newly created Task object, including its server-generated UUID and timestamps.
Always
null on success.201Example Response
Errors
| Status | Condition |
|---|---|
422 Unprocessable Entity | name is missing or empty, or deadline is not a valid ISO 8601 date string. |
401 Unauthorized | JWT is missing or expired. |
422 Example
PATCH /api/v1/tasks/:taskId
Updates one or more fields of an existing task. All fields are optional — only the fields included in the request body are updated (partial update). The server verifies that the task belongs to the authenticated student before applying any changes. Authentication: JWT BearerPath Parameters
UUID of the task to update.
Request Body
All fields are optional. At least one should be provided for the request to have any effect.New task name. Cannot be an empty string if provided. Maximum 255 characters.
New description for the task.
New deadline as an ISO 8601 UTC datetime string, e.g.
2025-09-01T23:59:00Z.Example Request
Response — 200 OK
The updated Task object with all current field values.
Always
null on success.200Example Response
Errors
| Status | Condition |
|---|---|
403 Forbidden | The task exists but belongs to a different student. |
404 Not Found | No task with the given taskId exists. |
401 Unauthorized | JWT is missing or expired. |
DELETE /api/v1/tasks/:taskId
Performs a logical deletion of a task. The record is not removed from the database — insteadis_deleted is set to true on the task, and all associated micro-objectives have is_audit_only set to true in the same atomic transaction. This preserves the full audit trail as required by the platform’s data integrity policy.
Authentication: JWT Bearer
Path Parameters
UUID of the task to soft-delete.
Response — 204 No Content
On success the server returns HTTP204 with no response body.
Errors
| Status | Condition |
|---|---|
403 Forbidden | The task exists but belongs to a different student. |
404 Not Found | No task with the given taskId exists. |
401 Unauthorized | JWT is missing or expired. |
Soft-deleted tasks are excluded from all
GET /api/v1/tasks and GET /api/v1/dashboard responses. Micro-objectives with is_audit_only = true are similarly hidden from all active listing endpoints.GET /api/v1/tasks/:taskId/micro-objectives
Returns the active micro-objectives for a specific task. Only micro-objectives whereis_audit_only = false are returned — objectives from soft-deleted tasks are excluded. The server verifies task ownership before responding.
Authentication: JWT Bearer
Path Parameters
UUID of the parent task.
Response — 200 OK
Array of active MicroObjective objects for the task, ordered by
createdAt ascending.Always
null on success.200Example Response
Errors
| Status | Condition |
|---|---|
403 Forbidden | The task exists but belongs to a different student. |
404 Not Found | No task with the given taskId exists. |
401 Unauthorized | JWT is missing or expired. |
PATCH /api/v1/tasks/:taskId/micro-objectives/:moId
Updates a single micro-objective. The server verifies that the parent task belongs to the authenticated student, then confirms that the micro-objective belongs to that task before applying the update. All fields are optional. Authentication: JWT BearerPath Parameters
UUID of the parent task.
UUID of the micro-objective to update.
Request Body
Updated text content describing what the micro-objective requires.
Updated time estimate in minutes. Must be a positive integer. The database enforces an upper bound of 25 minutes per micro-objective.
Set to
true to mark this micro-objective as completed. Set to false to unmark it.Example Request — marking as complete
Response — 200 OK
The updated MicroObjective object.
Always
null on success.200Example Response
Errors
| Status | Condition |
|---|---|
403 Forbidden | The parent task belongs to a different student. |
404 Not Found | The task or the micro-objective does not exist, or the micro-objective does not belong to the given task. |
401 Unauthorized | JWT is missing or expired. |