API to disconnect user from Identity Provider

I have a requirement to disconnect a user from their Identity Provider. Is there a way I could do this programatically via the API?

I notice that there is a way to do this from the UI.

But I require a way to do this programatically.

I think this is the API call you’re looking for: /api/v1/idps/${idpId}/users/${userId}