API: how to set up the rules via API?

Hello everyone! Please advise. I need to set rule via API. How can I do it?
Should I use events?

Hi,

Rules are currently not available in the API.