Skip to content

MailchimpClient

Attributes

TRIGGER_OPERATIONS module-attribute

TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'OnMemberSubscribed': {'operation_id': 'OnMemberSubscribed', 'path': '/{connectionId}/trigger/lists/{list_id}/members', 'method': 'get', 'required_parameters': ['list_id'], 'callback_payload_type': 'GetMembersResponseModel'}, 'OnCreateList': {'operation_id': 'OnCreateList', 'path': '/{connectionId}/trigger/lists', 'method': 'get', 'required_parameters': [], 'callback_payload_type': 'GetListsResponseModel'}}

Classes

GetCampaignsResponse dataclass

GetCampaignsResponse(*, campaigns: Optional[List[CampaignResponseModel | Mapping[str, Any]]] = None)

Response for List campaigns

Attributes

campaigns class-attribute instance-attribute
campaigns: Optional[List[CampaignResponseModel | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True)

An array of objects, each representing a campaign

GetListsResponseModel dataclass

GetListsResponseModel(*, lists: Optional[List[CreateNewListResponseModel | Mapping[str, Any]]] = None, total_items: Optional[int] = None)

Response for Get all the lists

Attributes

lists class-attribute instance-attribute
lists: Optional[List[CreateNewListResponseModel | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True)

An array of objects, each representing a list

total_items class-attribute instance-attribute
total_items: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of items matching the query regardless of pagination

CreateNewListResponseModel dataclass

CreateNewListResponseModel(id: str, name: str, contact: Contact | Mapping[str, Any], permission_reminder: str, campaign_defaults: CampaignDefaults | Mapping[str, Any], email_type_option: bool, *, use_archive_bar: Optional[bool] = None, notify_on_subscribe: Optional[str] = None, notify_on_unsubscribe: Optional[str] = None, date_created: Optional[str] = None, list_rating: Optional[int] = None, subscribe_url_short: Optional[str] = None, subscribe_url_long: Optional[str] = None, beamer_address: Optional[str] = None, visibility: Optional[str] = None, modules: Optional[List[str]] = None, stats: Optional[Stats | Mapping[str, Any]] = None, links: Optional[List[Link | Mapping[str, Any]]] = None)

Response for New List

Attributes

id instance-attribute
id: str

A string that uniquely identifies this list

name instance-attribute
name: str

The name of the list

permission_reminder instance-attribute
permission_reminder: str

The permission reminder for the list

use_archive_bar class-attribute instance-attribute
use_archive_bar: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether campaigns for this list use the Archive Bar in archives by default

notify_on_subscribe class-attribute instance-attribute
notify_on_subscribe: Optional[str] = dataclass_field(default=None, kw_only=True)

The email address to send subscribe notifications to

notify_on_unsubscribe class-attribute instance-attribute
notify_on_unsubscribe: Optional[str] = dataclass_field(default=None, kw_only=True)

The email address to send unsubscribe notifications to

date_created class-attribute instance-attribute
date_created: Optional[str] = dataclass_field(default=None, kw_only=True)

The date and time that this list was created

list_rating class-attribute instance-attribute
list_rating: Optional[int] = dataclass_field(default=None, kw_only=True)

An auto-generated activity score for the list (0-5)

email_type_option instance-attribute
email_type_option: bool

Whether the list supports multiple formats for emails.When set to true, subscribers can choose whether they want to receive HTML or plain-text emails.When set to false, subscribers will receive HTML emails, with a plain-text alternative backup

subscribe_url_short class-attribute instance-attribute
subscribe_url_short: Optional[str] = dataclass_field(default=None, kw_only=True)

Our EepURL shortened version of this list's subscribe form

subscribe_url_long class-attribute instance-attribute
subscribe_url_long: Optional[str] = dataclass_field(default=None, kw_only=True)

The full version of this list's subscribe form (host will vary)

beamer_address class-attribute instance-attribute
beamer_address: Optional[str] = dataclass_field(default=None, kw_only=True)

The list's Email Beamer address

visibility class-attribute instance-attribute
visibility: Optional[str] = dataclass_field(default=None, kw_only=True)

Whether this list is public or private

modules class-attribute instance-attribute
modules: Optional[List[str]] = dataclass_field(default=None, kw_only=True)

Any list-specific modules installed for this list

links: Optional[List[Link | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '_links'})

A list of link types and descriptions for the API schema documents

GetAddMembersBatchResponseModel dataclass

GetAddMembersBatchResponseModel(*, total_created: Optional[int] = None, total_updated: Optional[int] = None, error_count: Optional[int] = None)

Response for Subscribe or unsubscribe list members

Attributes

total_created class-attribute instance-attribute
total_created: Optional[int] = dataclass_field(default=None, kw_only=True)

Total number of members that were added to the list

total_updated class-attribute instance-attribute
total_updated: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of an existing list members whose subscription status was updated

error_count class-attribute instance-attribute
error_count: Optional[int] = dataclass_field(default=None, kw_only=True)

The number email addresses that could not be added to the list or updated

GetAllMembersResponseModel dataclass

GetAllMembersResponseModel(*, members: Optional[List[MemberResponseModel | Mapping[str, Any]]] = None, list_id: Optional[str] = None, total_items: Optional[int] = None)

Response for Show list members

Attributes

members class-attribute instance-attribute
members: Optional[List[MemberResponseModel | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True)

An array of objects, each representing a specific list member

list_id class-attribute instance-attribute
list_id: Optional[str] = dataclass_field(default=None, kw_only=True)

The list id

total_items class-attribute instance-attribute
total_items: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of items matching the query regardless of pagination

MemberResponseModel dataclass

MemberResponseModel(*, id: Optional[str] = None, email_address: Optional[str] = None, unique_email_id: Optional[str] = None, email_type: Optional[str] = None, status: Optional[str] = None, merge_fields: Optional[FirstAndLastName | Mapping[str, Any]] = None, stats: Optional[Stats | Mapping[str, Any]] = None, ip_signup: Optional[str] = None, timestamp_signup: Optional[str] = None, ip_opt: Optional[str] = None, timestamp_opt: Optional[str] = None, member_rating: Optional[int] = None, last_changed: Optional[str] = None, language: Optional[str] = None, vip: Optional[bool] = None, email_client: Optional[str] = None, location: Optional[Location | Mapping[str, Any]] = None, last_note: Optional[LastNote | Mapping[str, Any]] = None, list_id: Optional[str] = None, links: Optional[List[Link | Mapping[str, Any]]] = None)

Response for Add member to list

Attributes

id class-attribute instance-attribute
id: Optional[str] = dataclass_field(default=None, kw_only=True)

The MD5 hash of the lowercase version of the list member's email address

email_address class-attribute instance-attribute
email_address: Optional[str] = dataclass_field(default=None, kw_only=True)

Email address for a subscriber

unique_email_id class-attribute instance-attribute
unique_email_id: Optional[str] = dataclass_field(default=None, kw_only=True)

An identifier for the address across all of MailChimp

email_type class-attribute instance-attribute
email_type: Optional[str] = dataclass_field(default=None, kw_only=True)

Type of email this member asked to get ('html' or 'text').

status class-attribute instance-attribute
status: Optional[str] = dataclass_field(default=None, kw_only=True)

Subscriber's current status. Possible Values: subscribed, unsubscribed, cleaned, pending

ip_signup class-attribute instance-attribute
ip_signup: Optional[str] = dataclass_field(default=None, kw_only=True)

IP address the subscriber signed up from

timestamp_signup class-attribute instance-attribute
timestamp_signup: Optional[str] = dataclass_field(default=None, kw_only=True)

Date and time the subscriber signed up for the list

ip_opt class-attribute instance-attribute
ip_opt: Optional[str] = dataclass_field(default=None, kw_only=True)

The IP address the subscriber used to confirm their opt-in status

timestamp_opt class-attribute instance-attribute
timestamp_opt: Optional[str] = dataclass_field(default=None, kw_only=True)

Date and time the subscribe confirmed their opt-in status

member_rating class-attribute instance-attribute
member_rating: Optional[int] = dataclass_field(default=None, kw_only=True)

Star rating for this member, between 1 and 5

last_changed class-attribute instance-attribute
last_changed: Optional[str] = dataclass_field(default=None, kw_only=True)

Date and time the member's info was last changed

language class-attribute instance-attribute
language: Optional[str] = dataclass_field(default=None, kw_only=True)

If set/detected, the subscriber's language

vip class-attribute instance-attribute
vip: Optional[bool] = dataclass_field(default=None, kw_only=True)

VIP status for subscriber

email_client class-attribute instance-attribute
email_client: Optional[str] = dataclass_field(default=None, kw_only=True)

The list member's email client

list_id class-attribute instance-attribute
list_id: Optional[str] = dataclass_field(default=None, kw_only=True)

The list id

links: Optional[List[Link | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '_links'})

A list of link types and descriptions for the API schema documents

GetMembersResponseModel dataclass

GetMembersResponseModel(*, members: Optional[List[AddUserResponseModel | Mapping[str, Any]]] = None, list_id: Optional[str] = None, total_items: Optional[int] = None)

Response for When a Member has been added to a list

Attributes

members class-attribute instance-attribute
members: Optional[List[AddUserResponseModel | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True)

An array of objects, each representing a specific list member

list_id class-attribute instance-attribute
list_id: Optional[str] = dataclass_field(default=None, kw_only=True)

The list id

total_items class-attribute instance-attribute
total_items: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of items matching the query regardless of pagination

CampaignResponseModel dataclass

CampaignResponseModel(*, id: Optional[str] = None, type_: Optional[str] = None, create_time: Optional[str] = None, archive_url: Optional[str] = None, status: Optional[str] = None, emails_sent: Optional[int] = None, send_time: Optional[str] = None, content_type: Optional[str] = None, recipient: Optional[List[Recipient | Mapping[str, Any]]] = None, settings: Optional[Settings | Mapping[str, Any]] = None, variate_settings: Optional[VariateSettings | Mapping[str, Any]] = None, tracking: Optional[Tracking | Mapping[str, Any]] = None, rss_opts: Optional[RSSOpts | Mapping[str, Any]] = None, ab_split_opts: Optional[ABSplitOpts | Mapping[str, Any]] = None, social_card: Optional[SocialCard | Mapping[str, Any]] = None, report_summary: Optional[ReportSummary | Mapping[str, Any]] = None, delivery_status: Optional[DeliveryStatus | Mapping[str, Any]] = None, links: Optional[List[Link | Mapping[str, Any]]] = None)

Response for New Campaign

Attributes

id class-attribute instance-attribute
id: Optional[str] = dataclass_field(default=None, kw_only=True)

A string that uniquely identifies this campaign

type_ class-attribute instance-attribute
type_: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'type'})

There are four types of campaigns you can create in MailChimp. A/B Split campaigns have been deprecated and variate campaigns should be used instead

create_time class-attribute instance-attribute
create_time: Optional[str] = dataclass_field(default=None, kw_only=True)

The date and time the campaign was created

archive_url class-attribute instance-attribute
archive_url: Optional[str] = dataclass_field(default=None, kw_only=True)

The link to the campaign's archive version

status class-attribute instance-attribute
status: Optional[str] = dataclass_field(default=None, kw_only=True)

The current status of the campaign.

emails_sent class-attribute instance-attribute
emails_sent: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of emails sent for this campaign

send_time class-attribute instance-attribute
send_time: Optional[str] = dataclass_field(default=None, kw_only=True)

The time and date a campaign was sent

content_type class-attribute instance-attribute
content_type: Optional[str] = dataclass_field(default=None, kw_only=True)

How the campaign's content is put together ('template', 'drag_and_drop', 'html', 'url')

recipient class-attribute instance-attribute
recipient: Optional[List[Recipient | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True)

List settings for the campaign

links: Optional[List[Link | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '_links'})

A list of link types and descriptions for the API schema documents

Recipient dataclass

Recipient(list_id: str, *, segment_opts: Optional[SegmentOpts | Mapping[str, Any]] = None)

Definition: Recipient

Attributes

list_id instance-attribute
list_id: str

The unique list id

VariateSettings dataclass

VariateSettings(*, winner_criteria: Optional[str] = None, wait_time: Optional[int] = None, test_size: Optional[int] = None, subject_lines: Optional[List[str]] = None, send_times: Optional[List[str]] = None, from_names: Optional[List[str]] = None, reply_to_addresses: Optional[List[str]] = None)

Definition: Variate_Settings

Attributes

winner_criteria class-attribute instance-attribute
winner_criteria: Optional[str] = dataclass_field(default=None, kw_only=True)

The combination that performs the best. This may be determined automatically by click rate, open rate, or total revenue-or you may choose manually based on the reporting data you find the most valuable. For Multivariate Campaigns testing send_time, winner_criteria is ignored. For Multivariate Campaigns with 'manual' as the winner_criteria, the winner must be chosen in the MailChimp web application

wait_time class-attribute instance-attribute
wait_time: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of minutes to wait before choosing the winning campaign. The value of wait_time must be greater than 0 and in whole hours, specified in minutes

test_size class-attribute instance-attribute
test_size: Optional[int] = dataclass_field(default=None, kw_only=True)

The percentage of recipients to send the test combinations to, must be a value between 10 and 100

subject_lines class-attribute instance-attribute
subject_lines: Optional[List[str]] = dataclass_field(default=None, kw_only=True)

The possible subject lines to test. If no subject lines are provided, settings.subject_line will be used

send_times class-attribute instance-attribute
send_times: Optional[List[str]] = dataclass_field(default=None, kw_only=True)

The possible send times to test. The times provided should be in the format YYYY-MM-DD HH:MM:SS. If send_times are provided to test, the test_size will be set to 100% and winner_criteria will be ignored

from_names class-attribute instance-attribute
from_names: Optional[List[str]] = dataclass_field(default=None, kw_only=True)

The possible from names. The number of from_names provided must match the number of reply_to_addresses. If no from_names are provided, settings.from_name will be used

reply_to_addresses class-attribute instance-attribute
reply_to_addresses: Optional[List[str]] = dataclass_field(default=None, kw_only=True)

The possible from names. The number of from_names provided must match the number of reply_to_addresses. If no from_names are provided, settings.from_name will be used

Tracking dataclass

Tracking(*, opens: Optional[bool] = None, html_clicks: Optional[bool] = None, text_clicks: Optional[bool] = None, goal_tracking: Optional[bool] = None, ecomm360: Optional[bool] = None, google_analytics: Optional[str] = None, clicktale: Optional[str] = None, salesforce: Optional[Salesforce | Mapping[str, Any]] = None, highrise: Optional[Highrise | Mapping[str, Any]] = None, capsule: Optional[Capsule | Mapping[str, Any]] = None)

Definition: Tracking

Attributes

opens class-attribute instance-attribute
opens: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether to track opens. Defaults to true. Cannot be set to false for variate campaigns

html_clicks class-attribute instance-attribute
html_clicks: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether to track clicks in the HTML version of the campaign. Defaults to true. Cannot be set to false for variate campaigns

text_clicks class-attribute instance-attribute
text_clicks: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether to track clicks in the plain-text version of the campaign. Defaults to true. Cannot be set to false for variate campaigns

goal_tracking class-attribute instance-attribute
goal_tracking: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether to enable Goal tracking

ecomm360 class-attribute instance-attribute
ecomm360: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether to enable eCommerce360 tracking

google_analytics class-attribute instance-attribute
google_analytics: Optional[str] = dataclass_field(default=None, kw_only=True)

The custom slug for Google Analytics tracking (max of 50 bytes)

clicktale class-attribute instance-attribute
clicktale: Optional[str] = dataclass_field(default=None, kw_only=True)

The custom slug for ClickTale tracking (max of 50 bytes)

RSSOpts dataclass

RSSOpts(*, feed_url: Optional[str] = None, frequency: Optional[str] = None, constrain_rss_img: Optional[str] = None, schedule: Optional[Schedule | Mapping[str, Any]] = None)

Definition: RSS_Opts

Attributes

feed_url class-attribute instance-attribute
feed_url: Optional[str] = dataclass_field(default=None, kw_only=True)

The URL for the RSS feed

frequency class-attribute instance-attribute
frequency: Optional[str] = dataclass_field(default=None, kw_only=True)

The frequency of the RSS Campaign

constrain_rss_img class-attribute instance-attribute
constrain_rss_img: Optional[str] = dataclass_field(default=None, kw_only=True)

Whether to add CSS to images in the RSS feed to constrain their width in campaigns

SocialCard dataclass

SocialCard(*, image_url: Optional[str] = None, description: Optional[str] = None, title: Optional[str] = None)

Definition: Social_Card

Attributes

image_url class-attribute instance-attribute
image_url: Optional[str] = dataclass_field(default=None, kw_only=True)

The url for the header image for the card

description class-attribute instance-attribute
description: Optional[str] = dataclass_field(default=None, kw_only=True)

A short summary of the campaign to display

title class-attribute instance-attribute
title: Optional[str] = dataclass_field(default=None, kw_only=True)

The title for the card. Typically the subject line of the campaign

SegmentOpts dataclass

SegmentOpts(*, saved_segment_id: Optional[int] = None, match_: Optional[str] = None)

Definition: Segment_Opts

Attributes

saved_segment_id class-attribute instance-attribute
saved_segment_id: Optional[int] = dataclass_field(default=None, kw_only=True)

The id for an existing saved segment

match_ class-attribute instance-attribute
match_: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'match'})

Segment match type: Possible Values: any, all

Salesforce dataclass

Salesforce(*, campaign: Optional[bool] = None, notes: Optional[bool] = None)

Definition: Salesforce

Attributes

campaign class-attribute instance-attribute
campaign: Optional[bool] = dataclass_field(default=None, kw_only=True)

Create a campaign in a connected Salesforce account

notes class-attribute instance-attribute
notes: Optional[bool] = dataclass_field(default=None, kw_only=True)

Update contact notes for a campaign based on subscriber email addresses

Highrise dataclass

Highrise(*, campaign: Optional[bool] = None, notes: Optional[bool] = None)

Definition: Highrise

Attributes

campaign class-attribute instance-attribute
campaign: Optional[bool] = dataclass_field(default=None, kw_only=True)

Create a campaign in a connected Highrise account

notes class-attribute instance-attribute
notes: Optional[bool] = dataclass_field(default=None, kw_only=True)

Update contact notes for a campaign based on subscriber email addresses

Capsule dataclass

Capsule(*, notes: Optional[bool] = None)

Definition: Capsule

Attributes

notes class-attribute instance-attribute
notes: Optional[bool] = dataclass_field(default=None, kw_only=True)

Update contact notes for a campaign based on subscriber email addresses

Schedule dataclass

Schedule(*, hour: Optional[int] = None, daily_send: Optional[DailySend | Mapping[str, Any]] = None, weekly_send_day: Optional[str] = None, monthly_send_date: Optional[float] = None)

Definition: Schedule

Attributes

hour class-attribute instance-attribute
hour: Optional[int] = dataclass_field(default=None, kw_only=True)

The hour to send the campaign in local time. Acceptable hours are 0-23. For example, '4' would be 4am in your account's default time zone

weekly_send_day class-attribute instance-attribute
weekly_send_day: Optional[str] = dataclass_field(default=None, kw_only=True)

The day of the week to send a weekly RSS Campaign

monthly_send_date class-attribute instance-attribute
monthly_send_date: Optional[float] = dataclass_field(default=None, kw_only=True)

The day of the month to send a monthly RSS Campaign. Acceptable days are 1-32, where '0' is always the last day of a month. Months with fewer than the selected number of days will not have an RSS campaign sent out that day. For example, RSS Campaigns set to send on the 30th will not go out in February

DailySend dataclass

DailySend(*, sunday: Optional[bool] = None, monday: Optional[bool] = None, tuesday: Optional[bool] = None, wednesday: Optional[bool] = None, thursday: Optional[bool] = None, friday: Optional[bool] = None, saturday: Optional[bool] = None)

Definition: Daily_Send

Attributes

sunday class-attribute instance-attribute
sunday: Optional[bool] = dataclass_field(default=None, kw_only=True)

Sends the daily RSS Campaign on Sundays

monday class-attribute instance-attribute
monday: Optional[bool] = dataclass_field(default=None, kw_only=True)

Sends the daily RSS Campaign on Mondays

tuesday class-attribute instance-attribute
tuesday: Optional[bool] = dataclass_field(default=None, kw_only=True)

Sends the daily RSS Campaign on Tuesdays

wednesday class-attribute instance-attribute
wednesday: Optional[bool] = dataclass_field(default=None, kw_only=True)

Sends the daily RSS Campaign on Wednesdays

thursday class-attribute instance-attribute
thursday: Optional[bool] = dataclass_field(default=None, kw_only=True)

Sends the daily RSS Campaign on Thursdays

friday class-attribute instance-attribute
friday: Optional[bool] = dataclass_field(default=None, kw_only=True)

Sends the daily RSS Campaign on Fridays

saturday class-attribute instance-attribute
saturday: Optional[bool] = dataclass_field(default=None, kw_only=True)

Sends the daily RSS Campaign on Saturdays

Settings dataclass

Settings(subject_line: str, from_name: str, reply_to: str, *, title: Optional[str] = None, use_conversation: Optional[bool] = None, to_name: Optional[str] = None, folder_id: Optional[str] = None, authenticate: Optional[bool] = None, auto_footer: Optional[bool] = None, inline_css: Optional[bool] = None, auto_tweet: Optional[bool] = None, auto_fb_post: Optional[List[int]] = None, fb_comments: Optional[bool] = None)

Definition: Settings

Attributes

subject_line instance-attribute
subject_line: str

The subject line for the campaign

title class-attribute instance-attribute
title: Optional[str] = dataclass_field(default=None, kw_only=True)

The title of the campaign

from_name instance-attribute
from_name: str

The 'from' name on the campaign (not an email address)

reply_to instance-attribute
reply_to: str

The reply-to email address for the campaign

use_conversation class-attribute instance-attribute
use_conversation: Optional[bool] = dataclass_field(default=None, kw_only=True)

Use MailChimp Conversation feature to manage out-of-office replies

to_name class-attribute instance-attribute
to_name: Optional[str] = dataclass_field(default=None, kw_only=True)

The campaign's custom 'To' name. Typically the first name merge field

folder_id class-attribute instance-attribute
folder_id: Optional[str] = dataclass_field(default=None, kw_only=True)

If the campaign is listed in a folder, the id for that folder

authenticate class-attribute instance-attribute
authenticate: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether MailChimp authenticated the campaign. Defaults to true

auto_footer: Optional[bool] = dataclass_field(default=None, kw_only=True)

Automatically append MailChimp's default footer to the campaign

inline_css class-attribute instance-attribute
inline_css: Optional[bool] = dataclass_field(default=None, kw_only=True)

Automatically inline the CSS included with the campaign content

auto_tweet class-attribute instance-attribute
auto_tweet: Optional[bool] = dataclass_field(default=None, kw_only=True)

Automatically tweet a link to the campaign archive page when the campaign is sent

auto_fb_post class-attribute instance-attribute
auto_fb_post: Optional[List[int]] = dataclass_field(default=None, kw_only=True)

An array of Facebook page ids to auto-post to

fb_comments class-attribute instance-attribute
fb_comments: Optional[bool] = dataclass_field(default=None, kw_only=True)

Allows Facebook comments on the campaign (also force-enables the Campaign Archive toolbar). Defaults to true

ABSplitOpts dataclass

ABSplitOpts(*, split_test: Optional[str] = None, pick_winner: Optional[str] = None, wait_units: Optional[str] = None, wait_time: Optional[int] = None, split_size: Optional[int] = None, from_name_a: Optional[str] = None, from_name_b: Optional[str] = None, reply_email_a: Optional[str] = None, reply_email_b: Optional[str] = None, subject_a: Optional[str] = None, subject_b: Optional[str] = None, send_time_a: Optional[str] = None, send_time_b: Optional[str] = None, send_time_winner: Optional[str] = None)

Definition: AB_Split_Opts

Attributes

split_test class-attribute instance-attribute
split_test: Optional[str] = dataclass_field(default=None, kw_only=True)

The type of AB split to run

pick_winner class-attribute instance-attribute
pick_winner: Optional[str] = dataclass_field(default=None, kw_only=True)

How we should evaluate a winner. Based on 'opens', 'clicks', or 'manual'

wait_units class-attribute instance-attribute
wait_units: Optional[str] = dataclass_field(default=None, kw_only=True)

How unit of time for measuring the winner ('hours' or 'days'). This cannot be changed after a campaign is sent

wait_time class-attribute instance-attribute
wait_time: Optional[int] = dataclass_field(default=None, kw_only=True)

The amount of time to wait before picking a winner. This cannot be changed after a campaign is sent

split_size class-attribute instance-attribute
split_size: Optional[int] = dataclass_field(default=None, kw_only=True)

The size of the split groups. Campaigns split based on 'schedule' are forced to have a 50/50 split. Valid split integers are between 1-50

from_name_a class-attribute instance-attribute
from_name_a: Optional[str] = dataclass_field(default=None, kw_only=True)

For campaigns split on 'From Name', the name for Group A

from_name_b class-attribute instance-attribute
from_name_b: Optional[str] = dataclass_field(default=None, kw_only=True)

For campaigns split on 'From Name', the name for Group B

reply_email_a class-attribute instance-attribute
reply_email_a: Optional[str] = dataclass_field(default=None, kw_only=True)

For campaigns split on 'From Name', the reply-to address for Group A

reply_email_b class-attribute instance-attribute
reply_email_b: Optional[str] = dataclass_field(default=None, kw_only=True)

For campaigns split on 'From Name', the reply-to address for Group B

subject_a class-attribute instance-attribute
subject_a: Optional[str] = dataclass_field(default=None, kw_only=True)

For campaigns split on 'Subject Line', the subject line for Group A

subject_b class-attribute instance-attribute
subject_b: Optional[str] = dataclass_field(default=None, kw_only=True)

For campaigns split on 'Subject Line', the subject line for Group B

send_time_a class-attribute instance-attribute
send_time_a: Optional[str] = dataclass_field(default=None, kw_only=True)

The send time for Group A

send_time_b class-attribute instance-attribute
send_time_b: Optional[str] = dataclass_field(default=None, kw_only=True)

The send time for Group B

send_time_winner class-attribute instance-attribute
send_time_winner: Optional[str] = dataclass_field(default=None, kw_only=True)

The send time for the winning version

ReportSummary dataclass

ReportSummary(*, opens: Optional[int] = None, unique_opens: Optional[int] = None, open_rate: Optional[float] = None, clicks: Optional[int] = None, subscriber_clicks: Optional[float] = None, click_rate: Optional[float] = None)

Definition: Report_Summary

Attributes

opens class-attribute instance-attribute
opens: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of opens for a campaign

unique_opens class-attribute instance-attribute
unique_opens: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of unique opens

open_rate class-attribute instance-attribute
open_rate: Optional[float] = dataclass_field(default=None, kw_only=True)

The number of unique opens divided by the total number of successful deliveries

clicks class-attribute instance-attribute
clicks: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of clicks for an campaign

subscriber_clicks class-attribute instance-attribute
subscriber_clicks: Optional[float] = dataclass_field(default=None, kw_only=True)

The number of unique clicks

click_rate class-attribute instance-attribute
click_rate: Optional[float] = dataclass_field(default=None, kw_only=True)

The number of unique clicks divided by the total number of successful deliveries

DeliveryStatus dataclass

DeliveryStatus(*, enabled: Optional[bool] = None, can_cancel: Optional[bool] = None, status: Optional[str] = None, emails_sent: Optional[int] = None, emails_canceled: Optional[int] = None)

Definition: Delivery_Status

Attributes

enabled class-attribute instance-attribute
enabled: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether Campaign Delivery Status is enabled for this account and campaign

can_cancel class-attribute instance-attribute
can_cancel: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether a campaign send can be canceled

status class-attribute instance-attribute
status: Optional[str] = dataclass_field(default=None, kw_only=True)

The current state of a campaign delivery

emails_sent class-attribute instance-attribute
emails_sent: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of emails confirmed sent for this campaign so far

emails_canceled class-attribute instance-attribute
emails_canceled: Optional[int] = dataclass_field(default=None, kw_only=True)

The total number of emails canceled for this campaign

Link(*, rel: Optional[str] = None, href: Optional[str] = None, method: Optional[str] = None, target_schema: Optional[str] = None, schema: Optional[str] = None)

Definition: Link

rel class-attribute instance-attribute
rel: Optional[str] = dataclass_field(default=None, kw_only=True)

As with an HTML 'rel' attribute, this describes the type of link

href class-attribute instance-attribute
href: Optional[str] = dataclass_field(default=None, kw_only=True)

This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action

method class-attribute instance-attribute
method: Optional[str] = dataclass_field(default=None, kw_only=True)

The HTTP method that should be used when accessing the URL defined in 'href'. (GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD)

target_schema class-attribute instance-attribute
target_schema: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'targetSchema'})

For GETs, this is a URL representing the schema that the response should conform to

schema class-attribute instance-attribute
schema: Optional[str] = dataclass_field(default=None, kw_only=True)

For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to

NewCampaignRequest dataclass

NewCampaignRequest(type_: str, recipients: Recipient | Mapping[str, Any], settings: Settings | Mapping[str, Any], *, variate_settings: Optional[VariateSettings | Mapping[str, Any]] = None, tracking: Optional[Tracking | Mapping[str, Any]] = None, rss_opts: Optional[RSSOpts | Mapping[str, Any]] = None, social_card: Optional[SocialCard | Mapping[str, Any]] = None)

Definition: NewCampaignRequest

Attributes

type_ class-attribute instance-attribute
type_: str = dataclass_field(metadata={'wire_name': 'type'})

There are four types of campaigns you can create in MailChimp. A/B Split campaigns have been deprecated and variate campaigns should be used instead. Possible Values: regular, plaintext, absplit, rss, variate

NewListRequest dataclass

NewListRequest(name: str, contact: Contact | Mapping[str, Any], permission_reminder: str, campaign_defaults: CampaignDefaults | Mapping[str, Any], email_type_option: bool, *, use_archive_bar: Optional[bool] = None, notify_on_subscribe: Optional[str] = None, notify_on_unsubscribe: Optional[str] = None, visibility: Optional[str] = None)

Definition: NewListRequest

Attributes

name instance-attribute
name: str

The name of the list

permission_reminder instance-attribute
permission_reminder: str

Text to remind people how they signed up to this list

use_archive_bar class-attribute instance-attribute
use_archive_bar: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether campaigns for this list use the Archive Bar in archives by default

notify_on_subscribe class-attribute instance-attribute
notify_on_subscribe: Optional[str] = dataclass_field(default=None, kw_only=True)

The email address to send subscribe notifications to

notify_on_unsubscribe class-attribute instance-attribute
notify_on_unsubscribe: Optional[str] = dataclass_field(default=None, kw_only=True)

The email address to send unsubscribe notifications to

email_type_option instance-attribute
email_type_option: bool

When set to true, subscribers can choose whether they want to receive HTML or plain-text emails. When set to false, subscribers will receive HTML emails, with a plain-text alternative backup

visibility class-attribute instance-attribute
visibility: Optional[str] = dataclass_field(default=None, kw_only=True)

Whether this list is public or private

Contact dataclass

Contact(company: str, address1: str, city: str, state: str, zip: str, country: str, phone: str, *, address2: Optional[str] = None)

Definition: Contact

Attributes

company instance-attribute
company: str

The company name for the list

address1 instance-attribute
address1: str

The street address for the list contact

address2 class-attribute instance-attribute
address2: Optional[str] = dataclass_field(default=None, kw_only=True)

The street address for the list contact

city instance-attribute
city: str

The city for the list contact

state instance-attribute
state: str

The state for the list contact

zip instance-attribute
zip: str

The postal or zip code for the list contact

country instance-attribute
country: str

A two-character ISO3166 country code. Defaults to US if invalid

phone instance-attribute
phone: str

The phone number for the list contact

CampaignDefaults dataclass

CampaignDefaults(from_name: str, from_email: str, subject: str, language: str)

Definition: Campaign_Defaults

Attributes

from_name instance-attribute
from_name: str

The default from name for campaigns sent to this list

from_email instance-attribute
from_email: str

The default from email for campaigns sent to this list

subject instance-attribute
subject: str

The default subject line for campaigns sent to this list

language instance-attribute
language: str

The default language for this list's forms

Stats dataclass

Stats(*, member_count: Optional[int] = None, unsubscribe_count: Optional[int] = None, cleaned_count: Optional[int] = None, member_count_since_send: Optional[int] = None, unsubscribe_count_since_send: Optional[int] = None, cleaned_count_since_send: Optional[int] = None, campaign_count: Optional[int] = None, campaign_last_sent: Optional[str] = None, merge_field_count: Optional[int] = None, avg_sub_rate: Optional[float] = None, avg_unsub_rate: Optional[float] = None, target_sub_rate: Optional[float] = None, open_rate: Optional[float] = None, click_rate: Optional[float] = None, last_sub_date: Optional[str] = None, last_unsub_date: Optional[str] = None)

Definition: Stats

Attributes

member_count class-attribute instance-attribute
member_count: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of active members in the list

unsubscribe_count class-attribute instance-attribute
unsubscribe_count: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of members who have unsubscribed from the list

cleaned_count class-attribute instance-attribute
cleaned_count: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of members cleaned from the list

member_count_since_send class-attribute instance-attribute
member_count_since_send: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of active members in the list since the last campaign was sent

unsubscribe_count_since_send class-attribute instance-attribute
unsubscribe_count_since_send: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of members who have unsubscribed since the last campaign was sent

cleaned_count_since_send class-attribute instance-attribute
cleaned_count_since_send: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of members cleaned from the list since the last campaign was sent

campaign_count class-attribute instance-attribute
campaign_count: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of campaigns in any status that use this list

campaign_last_sent class-attribute instance-attribute
campaign_last_sent: Optional[str] = dataclass_field(default=None, kw_only=True)

The date and time the last campaign was sent to this list

merge_field_count class-attribute instance-attribute
merge_field_count: Optional[int] = dataclass_field(default=None, kw_only=True)

The number of merge vars for this list (not EMAIL, which is required)

avg_sub_rate class-attribute instance-attribute
avg_sub_rate: Optional[float] = dataclass_field(default=None, kw_only=True)

The average number of subscriptions per month for the list(not returned if we haven't calculated it yet)

avg_unsub_rate class-attribute instance-attribute
avg_unsub_rate: Optional[float] = dataclass_field(default=None, kw_only=True)

The average number of unsubscriptions per month for the list(not returned if we haven't calculated it yet)

target_sub_rate class-attribute instance-attribute
target_sub_rate: Optional[float] = dataclass_field(default=None, kw_only=True)

The target number of subscriptions per month for the list to keep it growing(not returned if we haven't calculated it yet)

open_rate class-attribute instance-attribute
open_rate: Optional[float] = dataclass_field(default=None, kw_only=True)

The average open rate(a percentage represented as a number between 0 and 100) per campaign for the list(not returned if we haven't calculated it yet)

click_rate class-attribute instance-attribute
click_rate: Optional[float] = dataclass_field(default=None, kw_only=True)

The average click rate(a percentage represented as a number between 0 and 100) per campaign for the list(not returned if we haven't calculated it yet)

last_sub_date class-attribute instance-attribute
last_sub_date: Optional[str] = dataclass_field(default=None, kw_only=True)

The date and time of the last time someone subscribed to this list

last_unsub_date class-attribute instance-attribute
last_unsub_date: Optional[str] = dataclass_field(default=None, kw_only=True)

The date and time of the last time someone unsubscribed from this list

NewMembersInListRequest dataclass

NewMembersInListRequest(members: List[NewMemberInListRequest | Mapping[str, Any]], *, update_existing: Optional[bool] = None)

Definition: NewMembersInListRequest

Attributes

members instance-attribute
members: List[NewMemberInListRequest | Mapping[str, Any]]

An array of objects, each representing an email address and the subscription status for a specific list. Up to 500 members may be added or updated with each API call.

update_existing class-attribute instance-attribute
update_existing: Optional[bool] = dataclass_field(default=None, kw_only=True)

Whether this batch operation will change existing members' subscription status.

NewMemberInListRequest dataclass

NewMemberInListRequest(status: str, email_address: str, *, email_type: Optional[str] = None, merge_fields: Optional[FirstAndLastName | Mapping[str, Any]] = None, language: Optional[str] = None, vip: Optional[bool] = None, location: Optional[Location | Mapping[str, Any]] = None)

Definition: NewMemberInListRequest

Attributes

email_type class-attribute instance-attribute
email_type: Optional[str] = dataclass_field(default=None, kw_only=True)

Type of email this member asked to get ('html' or 'text')

status instance-attribute
status: str

Subscriber's current status. Possible Values: subscribed, unsubscribed, cleaned, pending

language class-attribute instance-attribute
language: Optional[str] = dataclass_field(default=None, kw_only=True)

If set/detected, the subscriber's language

vip class-attribute instance-attribute
vip: Optional[bool] = dataclass_field(default=None, kw_only=True)

VIP status for subscriber

email_address instance-attribute
email_address: str

Email address for a subscriber

FirstAndLastName dataclass

FirstAndLastName(*, f_n_a_m_e: Optional[str] = None, l_n_a_m_e: Optional[str] = None)

Definition: FirstAndLastName

Attributes

f_n_a_m_e class-attribute instance-attribute
f_n_a_m_e: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'FNAME'})

First name of the subscriber

l_n_a_m_e class-attribute instance-attribute
l_n_a_m_e: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'LNAME'})

Last name of the subscriber

Location dataclass

Location(*, latitude: Optional[float] = None, longitude: Optional[float] = None)

Definition: Location

Attributes

latitude class-attribute instance-attribute
latitude: Optional[float] = dataclass_field(default=None, kw_only=True)

The location latitude

longitude class-attribute instance-attribute
longitude: Optional[float] = dataclass_field(default=None, kw_only=True)

The location longitude

LastNote dataclass

LastNote(*, note_id: Optional[int] = None, created_at: Optional[str] = None, created_by: Optional[str] = None, note: Optional[str] = None)

Definition: Last_Note

Attributes

note_id class-attribute instance-attribute
note_id: Optional[int] = dataclass_field(default=None, kw_only=True)

The note id

created_at class-attribute instance-attribute
created_at: Optional[str] = dataclass_field(default=None, kw_only=True)

The date the note was created

created_by class-attribute instance-attribute
created_by: Optional[str] = dataclass_field(default=None, kw_only=True)

The author of the note

note class-attribute instance-attribute
note: Optional[str] = dataclass_field(default=None, kw_only=True)

The content of the note

ObjectEntity dataclass

ObjectEntity(*, additional_properties: Dict[str, Any] = dict())

Definition: Object

Attributes

additional_properties class-attribute instance-attribute
additional_properties: Dict[str, Any] = dataclass_field(default_factory=dict, kw_only=True)

Dynamic properties determined at runtime (similar to .NET [JsonExtensionData])

UpdateMemberInListRequest dataclass

UpdateMemberInListRequest(status: str, *, email_type: Optional[str] = None, merge_fields: Optional[FirstAndLastName | Mapping[str, Any]] = None, language: Optional[str] = None, vip: Optional[bool] = None, location: Optional[Location | Mapping[str, Any]] = None)

Definition: UpdateMemberInListRequest

Attributes

email_type class-attribute instance-attribute
email_type: Optional[str] = dataclass_field(default=None, kw_only=True)

Type of email this member asked to get ('html' or 'text')

status instance-attribute
status: str

Subscriber's current status. Possible Values: subscribed, unsubscribed, cleaned, pending

language class-attribute instance-attribute
language: Optional[str] = dataclass_field(default=None, kw_only=True)

If set/detected, the subscriber's language

vip class-attribute instance-attribute
vip: Optional[bool] = dataclass_field(default=None, kw_only=True)

VIP status for subscriber

AddUserResponseModel dataclass

AddUserResponseModel(id: str, email_address: str, merge_fields: FirstAndLastName | Mapping[str, Any], *, unique_email_id: Optional[str] = None, email_type: Optional[str] = None, status: Optional[str] = None, stats: Optional[Stats | Mapping[str, Any]] = None, ip_signup: Optional[str] = None, timestamp_signup: Optional[str] = None, ip_opt: Optional[str] = None, timestamp_opt: Optional[str] = None, member_rating: Optional[int] = None, last_changed: Optional[str] = None, language: Optional[str] = None, vip: Optional[bool] = None, email_client: Optional[str] = None, location: Optional[Location | Mapping[str, Any]] = None, last_note: Optional[LastNote | Mapping[str, Any]] = None, list_id: Optional[str] = None, links: Optional[List[Link | Mapping[str, Any]]] = None)

Definition: AddUserResponseModel

Attributes

id instance-attribute
id: str

The MD5 hash of the lowercase version of the list member's email address

email_address instance-attribute
email_address: str

Email address for a subscriber

unique_email_id class-attribute instance-attribute
unique_email_id: Optional[str] = dataclass_field(default=None, kw_only=True)

An identifier for the address across all of MailChimp

email_type class-attribute instance-attribute
email_type: Optional[str] = dataclass_field(default=None, kw_only=True)

Type of email this member asked to get ('html' or 'text').

status class-attribute instance-attribute
status: Optional[str] = dataclass_field(default=None, kw_only=True)

Subscriber's current status. Possible Values: subscribed, unsubscribed, cleaned, pending

ip_signup class-attribute instance-attribute
ip_signup: Optional[str] = dataclass_field(default=None, kw_only=True)

IP address the subscriber signed up from

timestamp_signup class-attribute instance-attribute
timestamp_signup: Optional[str] = dataclass_field(default=None, kw_only=True)

Date and time the subscriber signed up for the list

ip_opt class-attribute instance-attribute
ip_opt: Optional[str] = dataclass_field(default=None, kw_only=True)

The IP address the subscriber used to confirm their opt-in status

timestamp_opt class-attribute instance-attribute
timestamp_opt: Optional[str] = dataclass_field(default=None, kw_only=True)

Date and time the subscribe confirmed their opt-in status

member_rating class-attribute instance-attribute
member_rating: Optional[int] = dataclass_field(default=None, kw_only=True)

Star rating for this member, between 1 and 5

last_changed class-attribute instance-attribute
last_changed: Optional[str] = dataclass_field(default=None, kw_only=True)

Date and time the member's info was last changed

language class-attribute instance-attribute
language: Optional[str] = dataclass_field(default=None, kw_only=True)

If set/detected, the subscriber's language

vip class-attribute instance-attribute
vip: Optional[bool] = dataclass_field(default=None, kw_only=True)

VIP status for subscriber

email_client class-attribute instance-attribute
email_client: Optional[str] = dataclass_field(default=None, kw_only=True)

The list member's email client

list_id class-attribute instance-attribute
list_id: Optional[str] = dataclass_field(default=None, kw_only=True)

The list id

links: Optional[List[Link | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '_links'})

A list of link types and descriptions for the API schema documents

MailchimpClient

MailchimpClient(connection_runtime_url: str, credential: AsyncTokenCredential | AzureKeyCredential, *, max_retry_attempts: int = 3, timeout: float = 30.0, use_exponential_backoff: bool = True, initial_retry_delay_seconds: float = 0.5, maximum_retry_delay_seconds: float = 120.0, retry_jitter_factor: float = 0.1, retry_unsafe_http_methods: bool = False, transport: Optional[AsyncHttpTransport] = None, **kwargs: Any)

Bases: ConnectorClientBase

Typed client for mailchimp connector.

Initialize a MailchimpClient.

Parameters:

Name Type Description Default
connection_runtime_url str

The connection runtime URL from Azure Portal.

required
credential AsyncTokenCredential | AzureKeyCredential

Caller-owned Azure Core credential.

required
max_retry_attempts int

The maximum number of request attempts.

3
timeout float

The network timeout in seconds for each request. The value configures Azure Core retry and transport deadlines. Nonpositive values disable SDK and transport deadlines.

30.0
use_exponential_backoff bool

Whether retries use exponential backoff.

True
initial_retry_delay_seconds float

The initial retry delay in seconds.

0.5
maximum_retry_delay_seconds float

The maximum retry delay in seconds.

120.0
retry_jitter_factor float

The jitter fraction applied to retry delays.

0.1
retry_unsafe_http_methods bool

Whether unsafe HTTP methods may be retried.

False
transport Optional[AsyncHttpTransport]

Optional Azure Core async HTTP transport closed by the client through its asynchronous lifecycle.

None
**kwargs Any

Optional Azure Core pipeline policy settings.

{}

Methods:

list_campaigns
list_campaigns(*, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]

List campaigns

This operation retrieves a list of campaigns in an account

Returns a single-page Azure Core async collection.

Swagger operation ID: GetCampaigns.

Parameters:

Name Type Description Default
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
AsyncItemPaged[dict[str, Any]]

AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector results. Consume it with async for.

Raises:

Type Description
ConnectorException

If the connector request fails.

sendcampaign async
sendcampaign(campaign_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None

Send Campaign

Send an existing campaign

Swagger operation ID: sendcampaign.

Parameters:

Name Type Description Default
campaign_id str

The unique id for the list.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Name Type Description
None None

The operation completes without a response body.

Raises:

Type Description
ConnectorException

If the connector request fails.

get_lists async
get_lists(*, count: Optional[int] = None, offset: Optional[int] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

Get all the lists

Find all the lists for the current user

Swagger operation ID: GetLists.

Parameters:

Name Type Description Default
count Optional[int]

The number of records to return. Default value is 10. Maximum value is 1000.

None
offset Optional[int]

The number of records from a collection to skip. Default value is 0.

None
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

newlist async
newlist(input: NewListRequest | Mapping[str, Any], *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

New List

Create a new list in your MailChimp account

Swagger operation ID: newlist.

Parameters:

Name Type Description Default
input NewListRequest | Mapping[str, Any]

The request body. Mapping keys use serialized Swagger wire names.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

add_members async
add_members(input: NewMembersInListRequest | Mapping[str, Any], list_id: str, *, skip_merge_validation: Optional[bool] = None, skip_duplicate_check: Optional[bool] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

Subscribe or unsubscribe list members

Batch subscribe or unsubscribe list members.

Swagger operation ID: AddMembers.

Parameters:

Name Type Description Default
input NewMembersInListRequest | Mapping[str, Any]

The request body. Mapping keys use serialized Swagger wire names.

required
list_id str

The unique id for the list.

required
skip_merge_validation Optional[bool]

Allows member data to be accepted without merge field values.

None
skip_duplicate_check Optional[bool]

Ignores duplicates sent in the request.

None
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

get_list_members async
get_list_members(list_id: str, *, count: Optional[int] = None, offset: Optional[int] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

Show list members

Show all the members of a list

Swagger operation ID: GetListMembers.

Parameters:

Name Type Description Default
list_id str

The unique id for the list.

required
count Optional[int]

The number of records to return. Default value is 10. Maximum value is 1000.

None
offset Optional[int]

The number of records from a collection to skip. Default value is 0.

None
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

addmember async
addmember(input: NewMemberInListRequest | Mapping[str, Any], list_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

Add member to list

Add or update a list member

Swagger operation ID: addmember.

Parameters:

Name Type Description Default
input NewMemberInListRequest | Mapping[str, Any]

The request body. Mapping keys use serialized Swagger wire names.

required
list_id str

The unique id for the list.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

newcampaign async
newcampaign(input: NewCampaignRequest | Mapping[str, Any], *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

New Campaign

Create a new campaign based on a Campaign Type, Recipients list and Campaign Settings (subject line, title, from_name and reply_to).

Swagger operation ID: newcampaignV2.

Parameters:

Name Type Description Default
input NewCampaignRequest | Mapping[str, Any]

The request body. Mapping keys use serialized Swagger wire names.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

removemember async
removemember(list_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None

Remove Member from list

Delete a member from a list.

Swagger operation ID: removemember_v2.

Parameters:

Name Type Description Default
list_id str

The unique id for the list.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Name Type Description
None None

The operation completes without a response body.

Raises:

Type Description
ConnectorException

If the connector request fails.

updatemember async
updatemember(input: UpdateMemberInListRequest | Mapping[str, Any], list_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

Update member information

Update information for a specific list member.

Swagger operation ID: updatemember_v2.

Parameters:

Name Type Description Default
input UpdateMemberInListRequest | Mapping[str, Any]

The request body. Mapping keys use serialized Swagger wire names.

required
list_id str

The unique id for the list.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.