How to verify page domain from an api

I can manually click the verify button in the page settings but how can i verify my page domain from an api level. or if its automatic how long will it takes to verify