How to enable cloudflare APO through API

Is there a way where i can enable Cloudflare APO through API for my customers. Meaning i want to setup dashboard where they have an option to enable APO for there domain.