Hi, We are in need of being able to change a user's email address via the REST API. After looking through the documentation and code, I can't see a way to do this in a simple way.
Although the documentation seems to show that if a user changes their preferred address, it will track throughout all their subscriptions.
See: https://gitlab.com/mailman/mailman/blob/master/src/mailman/rest/docs/members... "When Gwen changes her preferred address, her subscription automatically tracks the new address."
The only way I can see to do this via the REST API would be to do the following long winded way:
*1. Create a new address:* POST to http://<api_url>/3.1/users/<$OldEmail>/addresses $postData: {email = "$NewEmail"}
*2. Verify the new address:* POST to http://<api_url>/3.1/addresses/<$NewEmail>/verify $postData: { }
*3. Get all the memberships for the old email address* $memberships = GET to http://<api_url>/3.1/addresses/<$OldEmail>/memberships
*4. Change users email for each membership individually* foreach ($membership in $memberships) { PATCH to http://<api_url>/3.1/members/<$membership.member_id> $pathData: { address = $NewEmail } }
*5. Delete Old Address* DELETE to http://<api_url>/3.1/addresses/<$OldEmail>
Am I missing something (as in there is a way to do a single PATCH request somewhere)? Or is this the only way to update someone's email address with these 5 steps?
Thanks, Nathan Dixon