Hello,
Welcome to Microsoft Q&A!
No, currently there is no such API that could achieve this.
You could submit a feature request in the Feedback Hub about this. You could find the Feedback Hub in Start Menu.
Thank you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.