Api to toggle state and show individual todo detail