Newsletter subscription plugin - mathspp/mathspp GitHub Wiki

I have a custom plugin called newsletter-subscriber that can be used as a form action to subscribe someone to one of my Beehiiv newsletters.

The plugin reads my bearer token from a config file that lives in the VM and that is not on GitHub. The plugin reads the publication ID from a (hidden) form field called publication_id and then hits the Beehiiv API to add the subscriber to the newsletter.