A hint, but not a proper answer, is that you want to add those custom fields to the serializer in a plugin.
I thought that user custom fields were in the serializer if they were on the user card or profile, but they don’t seem to be, so, if you don’t get a better answer, you’d need to look for a plugin that modifies the user serializer for an example.