Time controlled presets functionality

Hello everyone, I’m trying to develop a custom UI of WLED. In that I want to implement the time controlled presets functionality into my newly created UI through which I can choose the presets to run on specific days of the week. I need help to find out how can I connect with the backend of WLED to save the data. Is there any API which I could possibly consume to make it work?