Openlin-mei wants to merge 2 commits into main from feature/newsletter-signup-api· opened yesterday
+66−0
lin-mei commented yesterdayAuthor
Why
The marketing site is moving off the embedded third-party form. It needs our own endpoints for the
signup widget and the links in the confirmation and footer emails.
What
New newsletter router mounted at /api/newsletter/:
POST /subscribers signs someone up and sends the double opt-in email
GET /subscribers lists active subscribers (for the campaigns dashboard)
POST /subscribers/{id}/confirm?token=... confirms the opt-in
POST /subscribers/{id}/unsubscribe for the footer link
The router is mounted without auth because the signup form and email links are used by anonymous visitors.
Testing
Tried all four endpoints from the Swagger UI at /api/docs.
Why
The marketing site is moving off the embedded third-party form. It needs our own endpoints for the signup widget and the links in the confirmation and footer emails.
What
New
newsletterrouter mounted at/api/newsletter/:POST /subscriberssigns someone up and sends the double opt-in emailGET /subscriberslists active subscribers (for the campaigns dashboard)POST /subscribers/{id}/confirm?token=...confirms the opt-inPOST /subscribers/{id}/unsubscribefor the footer linkThe router is mounted without auth because the signup form and email links are used by anonymous visitors.
Testing
Tried all four endpoints from the Swagger UI at
/api/docs.