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.

The TaskFlow API is a REST gateway running on port 5000 that routes requests to the underlying user and task microservices. Every response — success or error — follows a consistent JSON envelope, making it straightforward to handle results uniformly across all endpoints. All protected routes authenticate the caller via a JWT passed in the Authorization header; unauthenticated or unpermitted requests receive a structured error response with an appropriate HTTP status code.

Base URL

http://localhost:5000
All endpoint paths below are appended to this base URL (for example, http://localhost:5000/api/auth/login).

Response envelope

Every response from the API uses the same JSON structure:
FieldTypeAlways presentDescription
successbooleanYestrue for successful responses, false for errors.
messagestringYesHuman-readable summary of the outcome.
dataanyNoPayload returned by the operation (object, array, etc.).
metaobjectNoPagination metadata (present on paginated list responses).

Sample success response

{
  "success": true,
  "message": "Tasks retrieved successfully",
  "data": [
    {
      "_id": "664a1f2e8b1c2d3e4f5a6b7c",
      "title": "Write unit tests",
      "status": "in-progress",
      "priority": "high",
      "dueDate": "2025-12-31T00:00:00.000Z",
      "isVerifiedByAdmin": true,
      "createdAt": "2025-05-01T10:00:00.000Z",
      "updatedAt": "2025-05-10T14:23:00.000Z"
    }
  ],
  "meta": {
    "total": 42,
    "page": 1,
    "limit": 10,
    "totalPages": 5
  }
}

Sample error response

{
  "success": false,
  "message": "Your account is not verified. Please wait for admin approval."
}

Authentication

All protected routes require a JWT issued at login or signup. Pass it as a Bearer token in the request header:
Authorization: Bearer <your-token>
Requests to protected routes without a valid token return 401. See the authentication guide for full details on obtaining and using tokens.

HTTP error codes

CodeMeaning
400Validation error — a required field is missing or has an invalid value.
401Not authenticated — no token provided, token is invalid, or has expired.
403Forbidden — account not verified, or insufficient role (not admin).
404Resource not found — the requested user or task does not exist.
409Conflict — a duplicate resource exists (for example, duplicate email).
500Server error — an unexpected error occurred in the service.

Explore the endpoints

Authentication guide

Understand how to obtain a JWT and pass it in the Authorization header.

Authentication endpoints

Sign up, log in, fetch the current user profile, and reset a password.

Task endpoints

Create, list, retrieve, update, and delete tasks with filters and pagination.

Admin endpoints

Manage users and tasks as an admin — verify, assign, and delete.

Build docs developers (and LLMs) love