Welcome to the c0loria REST API
https://api.c0loria.com/apiPOST /api/auth/register - Register new userPOST /api/auth/login - Login userGET /api/auth/me - Get current user (requires auth)PATCH /api/users - Update user profile (requires auth)GET /api/objectives - Get all objectives (requires auth)POST /api/objectives - Create objective (requires auth)GET /api/objectives/:id - Get specific objectivePATCH /api/objectives/:id - Update objectiveDELETE /api/objectives/:id - Delete objectiveGET /api/tasks - Get all tasks (requires auth)POST /api/tasks - Create task (requires auth)GET /api/tasks/:id - Get specific taskPATCH /api/tasks/:id - Update taskDELETE /api/tasks/:id - Delete taskPOST /api/tasks/:id/complete - Toggle task completionGET /api/habits - Get all habits (requires auth)POST /api/habits - Create habit (requires auth)GET /api/habits/:id - Get specific habitPATCH /api/habits/:id - Update habitDELETE /api/habits/:id - Delete habitPOST /api/habits/:id/complete - Mark habit completionAll protected endpoints require a JWT token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKENAll responses follow this format:
{
"success": true,
"data": {
// Response data
}
}
// Or on error:
{
"error": {
"message": "Error message",
"code": "ERROR_CODE",
"statusCode": 400
}
}📚 For detailed documentation, see README.md