Is there a way to change or delete the secondary email

The easiest way to figure out how to make an API request to remove the secondary email would be to create a test user with a secondary email address, then remove the email address through the UI with your browser’s inspector opened to its Network tab. That method is outlined here: How to reverse engineer the Discourse API.

It looks like you need to make a DELETE request to /u/<discourse_username>/preferences/email.json

The email you are wanting to delete should be passed as form data. For example, email=simon%40foo.com

1 Like