Mby Mailchimp
Add or update a contact
Adds a contact to an audience or updates the contact with that email address, with its subscription status and merge fields.
Description
`subscriber_hash` is the MD5 hash of the lowercase email address; the endpoint also accepts the address itself. Send `email_address` and `status_if_new` (`subscribed`, `pending`, `unsubscribed`, `cleaned` or `transactional`); they take effect only when the contact is new.
upsert-list-member.md
Add or update a contact
Adds a contact to an audience or updates the contact with that email address, with its subscription status and merge fields.
subscriber_hash is the MD5 hash of the lowercase email address; the
endpoint also accepts the address itself. Send email_address and
status_if_new (subscribed, pending, unsubscribed, cleaned or
transactional); they take effect only when the contact is new.
Set up
Use the first option your agent supports.
API (official)
- Base URL: https://{dc}.api.mailchimp.com/3.0
- Endpoint:
PUT /lists/{list_id}/members/{subscriber_hash} - Auth: send the header
Authorization: Bearer $MAILCHIMP_API_KEY - Get a key: https://us1.admin.mailchimp.com/account/api/
- Docs: https://mailchimp.com/developer/marketing/api/
Before doing anything else, make one read-only call to confirm access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
Built from these files in the repository
The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.
Ways in
| Route | Source | Call | Required | Docs |
|---|---|---|---|---|
| Official | PUT /lists/{list_id}/members/{subscriber_hash} | API key in $MAILCHIMP_API_KEY | Docs |