You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the Mailchimp v3 API to perform a determined subscribe request
4
+
5
+
## Example request
6
+
7
+
POST a JSON body with the following structure:
8
+
9
+
-`email:string` — required
10
+
-`list_id:string` — required
11
+
-`interests:string[]` — optional
12
+
13
+
```json
14
+
{
15
+
"email": "ay@email.com",
16
+
"list_id": "2450jasf28",
17
+
"interests": ["3242ada24"]
18
+
}
19
+
```
20
+
21
+
## API Key & Env Config
22
+
23
+
A `MAILCHIMP_API_KEY` is required and should have rights to modify the desired list id. See Netlify docs for adding env vars and Mailchimp for API key creation.
24
+
25
+
## Requests
26
+
27
+
1. Check if existing audience member
28
+
29
+
- If existing and subscribed: done
30
+
- If existing but unsubscribed, resubscribe: done
31
+
-`TODO`: also diff interests and update if necessary
32
+
33
+
1. Add subscriber to list, with optional interests
0 commit comments