Create a automatic discount using the API

Good afternoon, can someone confirm if it’s possible to create automatic discounts via API, and if it is possible, how should I do it?