How can I update Presence/Status/Availability in MS Teams via an API call?

How can I update Presence/Status/Availability in MS Teams via an API call?

This only works for the currently logged-in user, but I discovered some undocumented commandline arguments for ms-teams.exe (I’m using New Teams) that successfully change presence:

--set-presence-to-available
--set-presence-to-dnd
--set-presence-to-be-right-back
--set-presence-to-away
--set-presence-to-offline
--reset-presence

I actually found these by disassembling the binary, there’s 0 reference to these on the Google-able internet so far. It’s possible they will be disabled in future.