Custom user field that’s hidden from user and editable by API?

I don’t quite understand how you’d do that, but you might check out DiscourseConnect to solve that problem. Or perhaps a custom plugin (if you’re self-hosted or on Enterprise) is what you’d want.

You could populate the User Note with the API the same as what you’d do with the API.