upsert_member
Add a member to an audience or update them if they already exist, using a single idempotent call.
Instructions
Add a member to an audience or update them if they already exist (idempotent upsert).
Use to reliably add-or-update a member in a single call without checking for existence first. Use add_member to strictly create a new member, or update_member to only modify an existing one.
Authenticated via API key. Max 10 concurrent requests. Respects read-only and dry-run modes.
Args: list_id: Audience/list ID (10-char alphanumeric, e.g. 'abc123def4'). Obtain from list_audiences. email_address: The member's email address. The subscriber hash is derived automatically. status_if_new: Status to apply only when the member is newly created (default 'subscribed'). Valid: 'subscribed', 'unsubscribed', 'cleaned', 'pending', 'transactional'. merge_fields: Optional dict of merge field values (e.g. {'FNAME': 'Ada', 'LNAME': 'Lovelace'}). tags: Optional list of tag names to apply to the member. account: Optional account name (e.g. 'marketing') configured via MAILCHIMP_API_KEY_. Omit to use the default account. See list_accounts.
Returns: JSON with id, email_address, status, merge_fields, tags, list_id, and timestamps. Returns an error object if the input is rejected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | ||
| account | No | ||
| list_id | Yes | ||
| merge_fields | No | ||
| email_address | Yes | ||
| status_if_new | No | subscribed |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |