Yes, there is an API available to access these settings, here is one helpful links: [Admin API
]1
this link highlights how you can turn-off 2-step verification, further explore this link for more available configuration