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]] = None)

Response for List campaigns

Attributes

campaigns class-attribute instance-attribute
campaigns: Optional[List[CampaignResponseModel]] = None

An array of objects, each representing a campaign

GetListsResponseModel dataclass

GetListsResponseModel(lists: Optional[List[CreateNewListResponseModel]] = None, total_items: Optional[int] = None)

Response for Get all the lists

Attributes

lists class-attribute instance-attribute
lists: Optional[List[CreateNewListResponseModel]] = None

An array of objects, each representing a list

total_items class-attribute instance-attribute
total_items: Optional[int] = None

The total number of items matching the query regardless of pagination

CreateNewListResponseModel dataclass

CreateNewListResponseModel(id: Optional[str] = None, name: Optional[str] = None, contact: Optional[Contact] = None, permission_reminder: Optional[str] = None, use_archive_bar: Optional[bool] = None, campaign_defaults: Optional[CampaignDefaults] = None, notify_on_subscribe: Optional[str] = None, notify_on_unsubscribe: Optional[str] = None, date_created: Optional[str] = None, list_rating: Optional[int] = None, email_type_option: Optional[bool] = 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] = None, links: Optional[List[Link]] = None)

Response for New List

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

A string that uniquely identifies this list

name class-attribute instance-attribute
name: Optional[str] = None

The name of the list

permission_reminder class-attribute instance-attribute
permission_reminder: Optional[str] = None

The permission reminder for the list

use_archive_bar class-attribute instance-attribute
use_archive_bar: Optional[bool] = None

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] = None

The email address to send subscribe notifications to

notify_on_unsubscribe class-attribute instance-attribute
notify_on_unsubscribe: Optional[str] = None

The email address to send unsubscribe notifications to

date_created class-attribute instance-attribute
date_created: Optional[str] = None

The date and time that this list was created

list_rating class-attribute instance-attribute
list_rating: Optional[int] = None

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

email_type_option class-attribute instance-attribute
email_type_option: Optional[bool] = None

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] = None

Our EepURL shortened version of this list's subscribe form

subscribe_url_long class-attribute instance-attribute
subscribe_url_long: Optional[str] = None

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

beamer_address class-attribute instance-attribute
beamer_address: Optional[str] = None

The list's Email Beamer address

visibility class-attribute instance-attribute
visibility: Optional[str] = None

Whether this list is public or private

modules class-attribute instance-attribute
modules: Optional[List[str]] = None

Any list-specific modules installed for this list

links: Optional[List[Link]] = field(default=None, 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] = None

Total number of members that were added to the list

total_updated class-attribute instance-attribute
total_updated: Optional[int] = None

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

error_count class-attribute instance-attribute
error_count: Optional[int] = None

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

GetAllMembersResponseModel dataclass

GetAllMembersResponseModel(members: Optional[List[MemberResponseModel]] = 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]] = None

An array of objects, each representing a specific list member

list_id class-attribute instance-attribute
list_id: Optional[str] = None

The list id

total_items class-attribute instance-attribute
total_items: Optional[int] = None

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] = None, stats: Optional[Stats] = 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] = None, last_note: Optional[LastNote] = None, list_id: Optional[str] = None, links: Optional[List[Link]] = None)

Response for Add member to list

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

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

email_address class-attribute instance-attribute
email_address: Optional[str] = None

Email address for a subscriber

unique_email_id class-attribute instance-attribute
unique_email_id: Optional[str] = None

An identifier for the address across all of MailChimp

email_type class-attribute instance-attribute
email_type: Optional[str] = None

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

status class-attribute instance-attribute
status: Optional[str] = None

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

ip_signup class-attribute instance-attribute
ip_signup: Optional[str] = None

IP address the subscriber signed up from

timestamp_signup class-attribute instance-attribute
timestamp_signup: Optional[str] = None

Date and time the subscriber signed up for the list

ip_opt class-attribute instance-attribute
ip_opt: Optional[str] = None

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

timestamp_opt class-attribute instance-attribute
timestamp_opt: Optional[str] = None

Date and time the subscribe confirmed their opt-in status

member_rating class-attribute instance-attribute
member_rating: Optional[int] = None

Star rating for this member, between 1 and 5

last_changed class-attribute instance-attribute
last_changed: Optional[str] = None

Date and time the member's info was last changed

language class-attribute instance-attribute
language: Optional[str] = None

If set/detected, the subscriber's language

vip class-attribute instance-attribute
vip: Optional[bool] = None

VIP status for subscriber

email_client class-attribute instance-attribute
email_client: Optional[str] = None

The list member's email client

list_id class-attribute instance-attribute
list_id: Optional[str] = None

The list id

links: Optional[List[Link]] = field(default=None, metadata={'wire_name': '_links'})

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

GetMembersResponseModel dataclass

GetMembersResponseModel(members: Optional[List[AddUserResponseModel]] = 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]] = None

An array of objects, each representing a specific list member

list_id class-attribute instance-attribute
list_id: Optional[str] = None

The list id

total_items class-attribute instance-attribute
total_items: Optional[int] = None

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]] = None, settings: Optional[Settings] = None, variate_settings: Optional[VariateSettings] = None, tracking: Optional[Tracking] = None, rss_opts: Optional[RSSOpts] = None, ab_split_opts: Optional[ABSplitOpts] = None, social_card: Optional[SocialCard] = None, report_summary: Optional[ReportSummary] = None, delivery_status: Optional[DeliveryStatus] = None, links: Optional[List[Link]] = None)

Response for New Campaign

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

A string that uniquely identifies this campaign

type_ class-attribute instance-attribute
type_: Optional[str] = field(default=None, 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] = None

The date and time the campaign was created

archive_url class-attribute instance-attribute
archive_url: Optional[str] = None

The link to the campaign's archive version

status class-attribute instance-attribute
status: Optional[str] = None

The current status of the campaign.

emails_sent class-attribute instance-attribute
emails_sent: Optional[int] = None

The total number of emails sent for this campaign

send_time class-attribute instance-attribute
send_time: Optional[str] = None

The time and date a campaign was sent

content_type class-attribute instance-attribute
content_type: Optional[str] = None

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

recipient class-attribute instance-attribute
recipient: Optional[List[Recipient]] = None

List settings for the campaign

links: Optional[List[Link]] = field(default=None, metadata={'wire_name': '_links'})

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

Recipient dataclass

Recipient(list_id: Optional[str] = None, segment_opts: Optional[SegmentOpts] = None)

Definition: Recipient

Attributes

list_id class-attribute instance-attribute
list_id: Optional[str] = None

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] = None

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] = None

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] = None

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]] = None

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]] = None

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]] = None

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]] = None

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] = None, highrise: Optional[Highrise] = None, capsule: Optional[Capsule] = None)

Definition: Tracking

Attributes

opens class-attribute instance-attribute
opens: Optional[bool] = None

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] = None

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] = None

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] = None

Whether to enable Goal tracking

ecomm360 class-attribute instance-attribute
ecomm360: Optional[bool] = None

Whether to enable eCommerce360 tracking

google_analytics class-attribute instance-attribute
google_analytics: Optional[str] = None

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

clicktale class-attribute instance-attribute
clicktale: Optional[str] = None

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] = None)

Definition: RSS_Opts

Attributes

feed_url class-attribute instance-attribute
feed_url: Optional[str] = None

The URL for the RSS feed

frequency class-attribute instance-attribute
frequency: Optional[str] = None

The frequency of the RSS Campaign

constrain_rss_img class-attribute instance-attribute
constrain_rss_img: Optional[str] = None

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] = None

The url for the header image for the card

description class-attribute instance-attribute
description: Optional[str] = None

A short summary of the campaign to display

title class-attribute instance-attribute
title: Optional[str] = None

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] = None

The id for an existing saved segment

match_ class-attribute instance-attribute
match_: Optional[str] = field(default=None, 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] = None

Create a campaign in a connected Salesforce account

notes class-attribute instance-attribute
notes: Optional[bool] = None

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] = None

Create a campaign in a connected Highrise account

notes class-attribute instance-attribute
notes: Optional[bool] = None

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] = None

Update contact notes for a campaign based on subscriber email addresses

Schedule dataclass

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

Definition: Schedule

Attributes

hour class-attribute instance-attribute
hour: Optional[int] = None

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] = None

The day of the week to send a weekly RSS Campaign

monthly_send_date class-attribute instance-attribute
monthly_send_date: Optional[float] = None

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] = None

Sends the daily RSS Campaign on Sundays

monday class-attribute instance-attribute
monday: Optional[bool] = None

Sends the daily RSS Campaign on Mondays

tuesday class-attribute instance-attribute
tuesday: Optional[bool] = None

Sends the daily RSS Campaign on Tuesdays

wednesday class-attribute instance-attribute
wednesday: Optional[bool] = None

Sends the daily RSS Campaign on Wednesdays

thursday class-attribute instance-attribute
thursday: Optional[bool] = None

Sends the daily RSS Campaign on Thursdays

friday class-attribute instance-attribute
friday: Optional[bool] = None

Sends the daily RSS Campaign on Fridays

saturday class-attribute instance-attribute
saturday: Optional[bool] = None

Sends the daily RSS Campaign on Saturdays

Settings dataclass

Settings(subject_line: Optional[str] = None, title: Optional[str] = None, from_name: Optional[str] = None, reply_to: 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 class-attribute instance-attribute
subject_line: Optional[str] = None

The subject line for the campaign

title class-attribute instance-attribute
title: Optional[str] = None

The title of the campaign

from_name class-attribute instance-attribute
from_name: Optional[str] = None

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

reply_to class-attribute instance-attribute
reply_to: Optional[str] = None

The reply-to email address for the campaign

use_conversation class-attribute instance-attribute
use_conversation: Optional[bool] = None

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

to_name class-attribute instance-attribute
to_name: Optional[str] = None

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

folder_id class-attribute instance-attribute
folder_id: Optional[str] = None

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

authenticate class-attribute instance-attribute
authenticate: Optional[bool] = None

Whether MailChimp authenticated the campaign. Defaults to true

auto_footer: Optional[bool] = None

Automatically append MailChimp's default footer to the campaign

inline_css class-attribute instance-attribute
inline_css: Optional[bool] = None

Automatically inline the CSS included with the campaign content

auto_tweet class-attribute instance-attribute
auto_tweet: Optional[bool] = None

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]] = None

An array of Facebook page ids to auto-post to

fb_comments class-attribute instance-attribute
fb_comments: Optional[bool] = None

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] = None

The type of AB split to run

pick_winner class-attribute instance-attribute
pick_winner: Optional[str] = None

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

wait_units class-attribute instance-attribute
wait_units: Optional[str] = None

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] = None

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] = None

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] = None

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

from_name_b class-attribute instance-attribute
from_name_b: Optional[str] = None

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

reply_email_a class-attribute instance-attribute
reply_email_a: Optional[str] = None

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] = None

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

subject_a class-attribute instance-attribute
subject_a: Optional[str] = None

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

subject_b class-attribute instance-attribute
subject_b: Optional[str] = None

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

send_time_a class-attribute instance-attribute
send_time_a: Optional[str] = None

The send time for Group A

send_time_b class-attribute instance-attribute
send_time_b: Optional[str] = None

The send time for Group B

send_time_winner class-attribute instance-attribute
send_time_winner: Optional[str] = None

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] = None

The total number of opens for a campaign

unique_opens class-attribute instance-attribute
unique_opens: Optional[int] = None

The number of unique opens

open_rate class-attribute instance-attribute
open_rate: Optional[float] = None

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

clicks class-attribute instance-attribute
clicks: Optional[int] = None

The total number of clicks for an campaign

subscriber_clicks class-attribute instance-attribute
subscriber_clicks: Optional[float] = None

The number of unique clicks

click_rate class-attribute instance-attribute
click_rate: Optional[float] = None

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] = None

Whether Campaign Delivery Status is enabled for this account and campaign

can_cancel class-attribute instance-attribute
can_cancel: Optional[bool] = None

Whether a campaign send can be canceled

status class-attribute instance-attribute
status: Optional[str] = None

The current state of a campaign delivery

emails_sent class-attribute instance-attribute
emails_sent: Optional[int] = None

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

emails_canceled class-attribute instance-attribute
emails_canceled: Optional[int] = None

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] = None

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

href class-attribute instance-attribute
href: Optional[str] = None

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] = None

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] = field(default=None, 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] = None

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_: Optional[str] = None, recipients: Optional[Recipient] = None, settings: Optional[Settings] = None, variate_settings: Optional[VariateSettings] = None, tracking: Optional[Tracking] = None, rss_opts: Optional[RSSOpts] = None, social_card: Optional[SocialCard] = None)

Definition: NewCampaignRequest

Attributes

type_ class-attribute instance-attribute
type_: Optional[str] = field(default=None, 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: Optional[str] = None, contact: Optional[Contact] = None, permission_reminder: Optional[str] = None, use_archive_bar: Optional[bool] = None, campaign_defaults: Optional[CampaignDefaults] = None, notify_on_subscribe: Optional[str] = None, notify_on_unsubscribe: Optional[str] = None, email_type_option: Optional[bool] = None, visibility: Optional[str] = None)

Definition: NewListRequest

Attributes

name class-attribute instance-attribute
name: Optional[str] = None

The name of the list

permission_reminder class-attribute instance-attribute
permission_reminder: Optional[str] = None

Text to remind people how they signed up to this list

use_archive_bar class-attribute instance-attribute
use_archive_bar: Optional[bool] = None

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] = None

The email address to send subscribe notifications to

notify_on_unsubscribe class-attribute instance-attribute
notify_on_unsubscribe: Optional[str] = None

The email address to send unsubscribe notifications to

email_type_option class-attribute instance-attribute
email_type_option: Optional[bool] = None

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] = None

Whether this list is public or private

Contact dataclass

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

Definition: Contact

Attributes

company class-attribute instance-attribute
company: Optional[str] = None

The company name for the list

address1 class-attribute instance-attribute
address1: Optional[str] = None

The street address for the list contact

address2 class-attribute instance-attribute
address2: Optional[str] = None

The street address for the list contact

city class-attribute instance-attribute
city: Optional[str] = None

The city for the list contact

state class-attribute instance-attribute
state: Optional[str] = None

The state for the list contact

zip class-attribute instance-attribute
zip: Optional[str] = None

The postal or zip code for the list contact

country class-attribute instance-attribute
country: Optional[str] = None

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

phone class-attribute instance-attribute
phone: Optional[str] = None

The phone number for the list contact

CampaignDefaults dataclass

CampaignDefaults(from_name: Optional[str] = None, from_email: Optional[str] = None, subject: Optional[str] = None, language: Optional[str] = None)

Definition: Campaign_Defaults

Attributes

from_name class-attribute instance-attribute
from_name: Optional[str] = None

The default from name for campaigns sent to this list

from_email class-attribute instance-attribute
from_email: Optional[str] = None

The default from email for campaigns sent to this list

subject class-attribute instance-attribute
subject: Optional[str] = None

The default subject line for campaigns sent to this list

language class-attribute instance-attribute
language: Optional[str] = None

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] = None

The number of active members in the list

unsubscribe_count class-attribute instance-attribute
unsubscribe_count: Optional[int] = None

The number of members who have unsubscribed from the list

cleaned_count class-attribute instance-attribute
cleaned_count: Optional[int] = None

The number of members cleaned from the list

member_count_since_send class-attribute instance-attribute
member_count_since_send: Optional[int] = None

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] = None

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] = None

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

campaign_count class-attribute instance-attribute
campaign_count: Optional[int] = None

The number of campaigns in any status that use this list

campaign_last_sent class-attribute instance-attribute
campaign_last_sent: Optional[str] = None

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

merge_field_count class-attribute instance-attribute
merge_field_count: Optional[int] = None

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] = None

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] = None

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] = None

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] = None

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] = None

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] = None

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] = None

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

NewMembersInListRequest dataclass

NewMembersInListRequest(members: Optional[List[NewMemberInListRequest]] = None, update_existing: Optional[bool] = None)

Definition: NewMembersInListRequest

Attributes

members class-attribute instance-attribute
members: Optional[List[NewMemberInListRequest]] = None

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] = None

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

NewMemberInListRequest dataclass

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

Definition: NewMemberInListRequest

Attributes

email_type class-attribute instance-attribute
email_type: Optional[str] = None

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

status class-attribute instance-attribute
status: Optional[str] = None

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

language class-attribute instance-attribute
language: Optional[str] = None

If set/detected, the subscriber's language

vip class-attribute instance-attribute
vip: Optional[bool] = None

VIP status for subscriber

email_address class-attribute instance-attribute
email_address: Optional[str] = None

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] = field(default=None, 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] = field(default=None, 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] = None

The location latitude

longitude class-attribute instance-attribute
longitude: Optional[float] = None

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] = None

The note id

created_at class-attribute instance-attribute
created_at: Optional[str] = None

The date the note was created

created_by class-attribute instance-attribute
created_by: Optional[str] = None

The author of the note

note class-attribute instance-attribute
note: Optional[str] = None

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] = field(default_factory=dict)

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

UpdateMemberInListRequest dataclass

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

Definition: UpdateMemberInListRequest

Attributes

email_type class-attribute instance-attribute
email_type: Optional[str] = None

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

status class-attribute instance-attribute
status: Optional[str] = None

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

language class-attribute instance-attribute
language: Optional[str] = None

If set/detected, the subscriber's language

vip class-attribute instance-attribute
vip: Optional[bool] = None

VIP status for subscriber

AddUserResponseModel dataclass

AddUserResponseModel(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] = None, stats: Optional[Stats] = 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] = None, last_note: Optional[LastNote] = None, list_id: Optional[str] = None, links: Optional[List[Link]] = None)

Definition: AddUserResponseModel

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

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

email_address class-attribute instance-attribute
email_address: Optional[str] = None

Email address for a subscriber

unique_email_id class-attribute instance-attribute
unique_email_id: Optional[str] = None

An identifier for the address across all of MailChimp

email_type class-attribute instance-attribute
email_type: Optional[str] = None

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

status class-attribute instance-attribute
status: Optional[str] = None

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

ip_signup class-attribute instance-attribute
ip_signup: Optional[str] = None

IP address the subscriber signed up from

timestamp_signup class-attribute instance-attribute
timestamp_signup: Optional[str] = None

Date and time the subscriber signed up for the list

ip_opt class-attribute instance-attribute
ip_opt: Optional[str] = None

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

timestamp_opt class-attribute instance-attribute
timestamp_opt: Optional[str] = None

Date and time the subscribe confirmed their opt-in status

member_rating class-attribute instance-attribute
member_rating: Optional[int] = None

Star rating for this member, between 1 and 5

last_changed class-attribute instance-attribute
last_changed: Optional[str] = None

Date and time the member's info was last changed

language class-attribute instance-attribute
language: Optional[str] = None

If set/detected, the subscriber's language

vip class-attribute instance-attribute
vip: Optional[bool] = None

VIP status for subscriber

email_client class-attribute instance-attribute
email_client: Optional[str] = None

The list member's email client

list_id class-attribute instance-attribute
list_id: Optional[str] = None

The list id

links: Optional[List[Link]] = field(default=None, metadata={'wire_name': '_links'})

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

MailchimpClient

MailchimpClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)

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
token_provider Optional[TokenProvider]

Optional token provider. Defaults to ManagedIdentityTokenProvider.

None
options Optional[ConnectorClientOptions]

Optional connector client options.

None

Methods:

get_campaigns_async async
get_campaigns_async() -> dict[str, Any] | None

List campaigns

This operation retrieves a list of campaigns in an account

sendcampaign_async async
sendcampaign_async(campaign_id: str) -> None

Send Campaign

Send an existing campaign

get_lists_async async
get_lists_async(count: Optional[int] = None, offset: Optional[int] = None) -> dict[str, Any] | None

Get all the lists

Find all the lists for the current user

newlist_async async
newlist_async(input: NewListRequest) -> dict[str, Any] | None

New List

Create a new list in your MailChimp account

add_members_async async
add_members_async(input: NewMembersInListRequest, list_id: str, skip_merge_validation: Optional[bool] = None, skip_duplicate_check: Optional[bool] = None) -> dict[str, Any] | None

Subscribe or unsubscribe list members

Batch subscribe or unsubscribe list members.

get_list_members_async async
get_list_members_async(list_id: str, count: Optional[int] = None, offset: Optional[int] = None) -> dict[str, Any] | None

Show list members

Show all the members of a list

addmember_async async
addmember_async(input: NewMemberInListRequest, list_id: str) -> dict[str, Any] | None

Add member to list

Add or update a list member

newcampaign_async async
newcampaign_async(input: NewCampaignRequest) -> 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).

removemember_async async
removemember_async(list_id: str) -> None

Remove Member from list

Delete a member from a list.

updatemember_async async
updatemember_async(input: UpdateMemberInListRequest, list_id: str) -> dict[str, Any] | None

Update member information

Update information for a specific list member.