Thanks @blake, I think that has me back on the right path.
curl -X PUT “https://discuss.example.com/u/karl_goetz.json?api_key=[...]&api_username=karl_goetz&mailing_list_mode=false&email_digests=true”
Now when I refresh the web my settings have changed from mailing list mode to activity summary.
After more annoyance and reporting to reading the pydisuourse source it appears the _PUT method doesn’t support passing params so I used their _request method directly.
d
{‘email_always’: ‘true’, ‘mailing_list_mode_frequency’: 1, ‘email_private_messages’: ‘true’, ‘email_direct’: ‘true’, ‘mailing_list_mode’: ‘false’, ‘digest_after_minutes’: 1440, ‘email_digests’: ‘true’, ‘include_tl0_in_digests’: False, ‘email_in_reply_to’: ‘true’, ‘email_previous_replies’: 1, ‘api_username’: ‘karl_goetz’, ‘api_key’: ‘[…]’}
discourse_client._request(‘PUT’, ‘/u/karl_goetz.json’, params=d)
Which behaved as expected.
Thanks again for your assistance.
PS.
Do you know why some user settings are only accessible via /u/username not /users/username ?