How to update user credential from API workflow?

Morning All,
Can someone please give me an idea how I can set up an API to update users credential.
I need to reused it so an API set up is at need. PLEASE HELP