From f32dcb7316e540f5ca646e4271df574912525705 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sun, 22 Mar 2026 16:51:39 -0700 Subject: [PATCH] Fix newsletter subscription endpoint to use Listmonk public API The form was POSTing to /subscription/form (404) instead of /api/public/subscription with JSON payload. Co-Authored-By: Claude Opus 4.6 --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index dd77bd4..99dcf30 100644 --- a/index.html +++ b/index.html @@ -868,10 +868,10 @@ document.getElementById('newsletter-form').addEventListener('submit', async func submitBtn.disabled = true; try { - const response = await fetch(LISTMONK_URL + '/subscription/form', { + const response = await fetch(LISTMONK_URL + '/api/public/subscription', { method: 'POST', - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - body: new URLSearchParams({ email: email, list: LIST_UUID, name: '' }), + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ email: email, list_uuids: [LIST_UUID] }), }); if (response.ok) {