How to migrate users with RestAPI?

Hello
I am using checkmk 2.4
I have a use case where I need to move user from htpasswd to ldap connector.

I found out it can be done through web UI, thanks to this werk Werk #15477: New option to migrate users to another user connector
Is there a way to do it with the restAPI?

The put endpoint for user management does not accept ldap as auth_type.

Is it possible to migrate a user’s connector from htpasswd to ldap through the API?