Design note — Mailchimp connector (mailchimp)
Target registry item: C4 (OB-GAP-5 — no email platform other than Klaviyo; first demand 203K9, whose footer carries a Mailchimp newsletter form). Status: design note only — NOT in CONNECTOR_CATALOG; nothing built, nothing available. The register's "Needs" line is "consent posture for audience data" — answered below by excluding member-level data from v1. CDoD points 1–14 are tracked in docs/reports/ONBOARDING_CONNECTORS_STATE.md.
Auth
Mailchimp Marketing API 3.0: an account API key sent as the password of HTTP basic auth (--user "anystring:<key>"), base https://api.mailchimp.com/3.0/ in the fetched quick-start (fetched 2026-10-12); the data-center-prefixed host form and the key's -usNN suffix are from prior knowledge, not re-fetched, and are verified at build (CDoD point 1). OAuth2 exists for registered apps (prior knowledge, not re-fetched).
- API key typed on the card (preferred). Tenant-owned, generated in the tenant's account; vault-stored; adapter GET-only.
- Platform OAuth2 app (fallback). Platform registration on Track O; never on a tenant form.
Vault-only per (tenant, provider); no environment fallback; vault error → 503; absent → merchant_credentials_not_configured; an audience_id in a request is a confirmation of a declared audience, never an override.
Fields (catalog row, when built)
| key | label | secret | required | pattern | help |
|---|---|---|---|---|---|
api_key |
API key | yes | yes | — | Account → Extras → API keys. The platform reads campaign reports and audience totals only; it never reads your subscriber list. |
audience_id |
Audience ID | no | no | ^[a-f0-9]{10}$ |
Audience → Settings → Audience name and defaults. Confirms which audience's totals are read. |
The audience_id pattern is the 10-hex shape from prior knowledge and is verified at build.
Scopes
Mailchimp API keys carry no scope granularity (prior knowledge; verify at build). Read-only is therefore enforced by the adapter, in the exact shape klaviyo_connector.py already uses: an _assert_aggregate_endpoint-style allow-list of paths (/reports, /campaigns, /lists/{id} summary fields) and a test that no POST/PATCH/DELETE and no /lists/{id}/members path is reachable from the module. The card help text says the key grants more than the platform uses.
Data topics
Campaign reports (sends, opens, clicks, bounces, unsubscribes, by campaign and send date); campaign metadata (name, subject, send time); audience totals (member_count, growth history by month). All aggregate.
Excluded from v1 by design: list members, member activity, merge fields, segments and tags — every person-level surface. This is the consent-posture answer OB-GAP-5 asks for: audience data enters only as totals until a tenant declares a lawful basis per subject through the consent registry and a later note adds the member topic with its own posture row.
Consent posture
| topic | posture |
|---|---|
| campaign report aggregates | de-personalised remainder; no person-level field |
| audience totals / growth | aggregate counts; no subject key |
| members / activity / merge fields | NOT ingested; the adapter cannot reach the path (allow-list), pinned in both directions |
Posture test in the TestD3ProcessingPosture style pins every emitted field as non-person-level.
Mapper target
Same lane as Klaviyo's pull half: adapter → CanonicalRecord (record_type: campaign_performance, source_system: marketing_connector:mailchimp:campaign_performance) → gateway callback → canonical ingestion → mizoki_unified_data; audience totals as MARKET_MAPPERS["mailchimp"] MarketSignal rows. No new store.
Failure modes → test-connection verdicts
| Failure | Verdict / fix |
|---|---|
| 401 from the vendor | credentials_invalid → "Create a new API key under Account → Extras → API keys." |
| Key's data center differs from the one derived (if the suffix form is confirmed) | 422 invalid_field_format naming the expected suffix |
audience_id not in the account |
account_not_granted with the discovered audiences' ids (ids only, never names of people) |
| Rate limited | test_rate_limited (existing) |
| Vault read error | 503 fail-closed |
Flag
MAILCHIMP_SYNC default OFF; catalog row available: false until CDoD point 14 (a real campaign report round-trips into mizoki_unified_data, recorded with date and revision).
Owner / operator gates
- Owner: none for v1 (aggregates only). Adding the member topic later is an owner decision because it is person-level data from a third party under the tenant's basis.
- Operator (path 2 only): register the platform OAuth2 app with Mailchimp; client id/secret by env NAME.
Vendor references
- Mailchimp Marketing API quick start — https://mailchimp.com/developer/marketing/guides/quick-start/ — fetched 2026-10-12 (basic auth with the key as password;
api.mailchimp.com/3.0/ping). - Mailchimp API fundamentals — https://mailchimp.com/developer/marketing/docs/fundamentals/ — fetched 2026-10-12 (root URL, resource structure, OpenAPI description).
- Key format / data-center suffix, OAuth2 flow, reports endpoints and rate limits — not re-fetched from this sandbox on 2026-10-12.