Admin endpoints are split across two service routes: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.
/api/admin routes to the user service for user management, and /api/admin/tasks routes to the task service for task administration. All six endpoints require a JWT issued to an account with the admin role. Requests made with a standard user token — even a verified one — return 403 Forbidden.
A
403 response on any admin endpoint means the token in your Authorization header does not belong to an admin account. Log in with an admin-role account to obtain the correct token.List all users
GET /api/admin/users
Returns all registered user accounts.
Headers
Bearer <token> — JWT from an admin account.Example
Verify a user
PATCH /api/admin/users/:id/verify
Marks a user account as verified, allowing the user to access task endpoints.
Headers
Bearer <token> — JWT from an admin account.Path parameters
The user’s unique identifier.
Example
Delete a user
DELETE /api/admin/users/:id
Permanently removes a user account and all associated data.
Headers
Bearer <token> — JWT from an admin account.Path parameters
The user’s unique identifier.
Example
Assign a task
POST /api/admin/tasks/assign
Creates a task and assigns it to a specific user. The assigned user can view the task in their task list once it is verified.
Headers
Bearer <token> — JWT from an admin account.Body parameters
The ID of the user to assign the task to.
Task title.
Optional task description.
Initial task status. One of
pending, in-progress, or completed.Task priority. One of
low, medium, or high.Due date as an ISO 8601 string (e.g.,
2025-12-31T00:00:00.000Z).Example
List pending tasks
GET /api/admin/tasks/pending
Returns all tasks across all users that are awaiting admin verification.
Headers
Bearer <token> — JWT from an admin account.Example
Verify a task
PATCH /api/admin/tasks/:id/verify
Marks a task as verified by an admin. Verified tasks are visible and usable by the assigned user.
Headers
Bearer <token> — JWT from an admin account.Path parameters
The task’s unique identifier.