> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://mailchimp.com/developer/marketing/api/surveys/create-list-survey-action-create-email/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mailchimp.com/_mcp/server. # Create a Survey Campaign POST https://api.mailchimp.com/3.0/lists/{list_id}/surveys/{survey_id}/actions/create-email Utilize the List ID and Survey ID to generate a Campaign that links to your survey. Reference: https://mailchimp.com/developer/marketing/api/surveys/create-list-survey-action-create-email ## Authentication - `Authorization` header (bearer token, required) — Authorization using a Mailchimp API key (a.k.a. Bearer token) - `Authorization` header (bearer token, required) — Authorization using OAuth ## Request ### Path parameters - `list_id` (string, required) — The unique ID for the list. - `survey_id` (string, required) — The ID of the survey. ## Response ### 200 Campaign Instance - `type` (enum, required) — There are four types of [campaigns](https://mailchimp.com/help/getting-started-with-campaigns/) you can create in Mailchimp. A/B Split campaigns have been deprecated and variate campaigns should be used instead. - Allowed values: `regular`, `plaintext`, `absplit`, `rss`, `variate` - `_links` (list of CampaignLinksItems, optional) — A list of link types and descriptions for the API schema documents. - `ab_split_opts` (ABTestingOptions, optional) — [A/B Testing](https://mailchimp.com/help/about-ab-tests/) options for a campaign. - `archive_url` (string, optional) — The link to the campaign's archive version. - `content_type` (string, optional) — How the campaign's content is put together ('template', 'drag_and_drop', 'html', 'url'). - `create_time` (datetime, optional) — The date and time the campaign was created in ISO 8601 format. - `delivery_status` (CampaignDeliveryStatus, optional) — Updates on campaigns in the process of sending. - `emails_sent` (integer, optional) — The total number of emails sent for this campaign. - `id` (string, optional) — A string that uniquely identifies this campaign. - `long_archive_url` (string, optional) — The original link to the campaign's archive version. - `needs_block_refresh` (boolean, optional) — Determines if the campaign needs its blocks refreshed by opening the web-based campaign editor. Deprecated and will always return false. - `parent_campaign_id` (string, optional) — If this campaign is the child of another campaign, this identifies the parent campaign. For Example, for RSS or Automation children. - `recipients` (CampaignRecipients, optional) — List settings for the campaign. - `report_summary` (CampaignReportSummary, optional) — For sent campaigns, a summary of opens and clicks. - `resendable` (boolean, optional) — Determines if the campaign qualifies to be resent to non-openers. - `rss_opts` (CampaignRssOpts, optional) — [RSS](https://mailchimp.com/help/share-your-blog-posts-with-mailchimp/) options for a campaign. - `send_time` (datetime, optional) — The date and time a campaign was sent in ISO 8601 format. - `settings` (CampaignSettings, optional) — The settings for your campaign, including subject, from name, reply-to address, and more. - `social_card` (CampaignSocialCard, optional) — The preview for the campaign, rendered by social networks like Facebook and Twitter. [Learn more](https://mailchimp.com/help/enable-and-customize-social-cards/). - `status` (enum, optional) — The current status of the campaign. - Allowed values: `save`, `paused`, `schedule`, `sending`, `sent`, `canceled`, `canceling`, `archived` - `tracking` (CampaignTrackingOptions, optional) — The tracking options for a campaign. - `variate_settings` (CampaignVariateSettings, optional) — The settings specific to A/B test campaigns. - `web_id` (integer, optional) — The ID used in the Mailchimp web application. View this campaign in your Mailchimp account at `https://{dc}.admin.mailchimp.com/campaigns/show/?id={web_id}`. ## Types ### CampaignLinksItems This object represents a link from the resource where it is found to another resource or action that may be performed. - `href` (string, optional) — This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action. - `method` (enum, optional) — The HTTP method that should be used when accessing the URL defined in 'href'. - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `OPTIONS`, `HEAD` - `rel` (string, optional) — As with an HTML 'rel' attribute, this describes the type of link. - `schema` (string, optional) — For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to. - `targetSchema` (string, optional) — For GETs, this is a URL representing the schema that the response should conform to. ### ABTestingOptions [A/B Testing](https://mailchimp.com/help/about-ab-tests/) options for a campaign. - `from_name_a` (string, optional) — For campaigns split on 'From Name', the name for Group A. - `from_name_b` (string, optional) — For campaigns split on 'From Name', the name for Group B. - `pick_winner` (enum, optional) — How we should evaluate a winner. Based on 'opens', 'clicks', or 'manual'. - Allowed values: `opens`, `clicks`, `manual` - `reply_email_a` (string, optional) — For campaigns split on 'From Name', the reply-to address for Group A. - `reply_email_b` (string, optional) — For campaigns split on 'From Name', the reply-to address for Group B. - `send_time_a` (datetime, optional) — The send time for Group A. - `send_time_b` (datetime, optional) — The send time for Group B. - `send_time_winner` (string, optional) — The send time for the winning version. - `split_size` (integer, optional) — 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. - `split_test` (enum, optional) — The type of AB split to run. - Allowed values: `subject`, `from_name`, `schedule` - `subject_a` (string, optional) — For campaigns split on 'Subject Line', the subject line for Group A. - `subject_b` (string, optional) — For campaigns split on 'Subject Line', the subject line for Group B. - `wait_time` (integer, optional) — The amount of time to wait before picking a winner. This cannot be changed after a campaign is sent. - `wait_units` (enum, optional) — How unit of time for measuring the winner ('hours' or 'days'). This cannot be changed after a campaign is sent. - Allowed values: `hours`, `days` ### CampaignDeliveryStatus Updates on campaigns in the process of sending. - `can_cancel` (boolean, optional) — Whether a campaign send can be canceled. - `emails_canceled` (integer, optional) — The total number of emails canceled for this campaign. - `emails_sent` (integer, optional) — The total number of emails confirmed sent for this campaign so far. - `enabled` (boolean, optional) — Whether Campaign Delivery Status is enabled for this account and campaign. - `status` (enum, optional) — The current state of a campaign delivery. - Allowed values: `delivering`, `delivered`, `canceling`, `canceled` ### CampaignRecipients List settings for the campaign. - `list_id` (string, required) — The unique list id. - `list_name` (string, optional) — The name of the list. - `recipient_count` (integer, optional) — Count of the recipients on the associated list. Formatted as an integer. - `segment_opts` (CampaignRecipientsSegmentOpts, optional) — An object representing all segmentation options. This object should contain a `saved_segment_id` to use an existing segment, or you can create a new segment by including both `match` and `conditions` options. - `segment_text` (string, optional) — A description of the [segment](https://mailchimp.com/help/save-and-manage-segments/) used for the campaign. Formatted as a string marked up with HTML. ### CampaignReportSummary For sent campaigns, a summary of opens and clicks. - `click_rate` (double, optional) — The number of unique clicks divided by the total number of successful deliveries. - `clicks` (integer, optional) — The total number of clicks for an campaign. - `ecommerce` (CampaignReportSummaryEcommerce, optional) — E-Commerce stats for a campaign. - `open_rate` (double, optional) — The number of unique opens divided by the total number of successful deliveries. - `opens` (integer, optional) — The total number of opens for a campaign. - `subscriber_clicks` (integer, optional) — The number of unique clicks. - `unique_opens` (integer, optional) — The number of unique opens. ### CampaignRssOpts [RSS](https://mailchimp.com/help/share-your-blog-posts-with-mailchimp/) options for a campaign. - `feed_url` (string, required) — The URL for the RSS feed. - `frequency` (enum, required) — The frequency of the RSS Campaign. - Allowed values: `daily`, `weekly`, `monthly` - `constrain_rss_img` (boolean, optional) — Whether to add CSS to images in the RSS feed to constrain their width in campaigns. - `last_sent` (datetime, optional) — The date the campaign was last sent. - `schedule` (CampaignRssOptsSchedule, optional) — The schedule for sending the RSS Campaign. ### CampaignSettings The settings for your campaign, including subject, from name, reply-to address, and more. - `authenticate` (boolean, optional) — Whether Mailchimp [authenticated](https://mailchimp.com/help/about-email-authentication/) the campaign. Defaults to `true`. - `auto_fb_post` (list of string, optional) — An array of [Facebook](https://mailchimp.com/help/connect-or-disconnect-the-facebook-integration/) page ids to auto-post to. - `auto_footer` (boolean, optional) — Automatically append Mailchimp's [default footer](https://mailchimp.com/help/about-campaign-footers/) to the campaign. - `auto_tweet` (boolean, optional) — Automatically tweet a link to the [campaign archive](https://mailchimp.com/help/about-email-campaign-archives-and-pages/) page when the campaign is sent. - `drag_and_drop` (boolean, optional) — Whether the campaign uses the drag-and-drop editor. - `fb_comments` (boolean, optional) — Allows Facebook comments on the campaign (also force-enables the Campaign Archive toolbar). Defaults to `true`. - `folder_id` (string, optional) — If the campaign is listed in a folder, the id for that folder. - `from_name` (string, optional) — The 'from' name on the campaign (not an email address). - `inline_css` (boolean, optional) — Automatically inline the CSS included with the campaign content. - `preview_text` (string, optional) — The preview text for the campaign. - `reply_to` (string, optional) — The reply-to email address for the campaign. - `subject_line` (string, optional) — The subject line for the campaign. - `template_id` (integer, optional) — The id for the template used in this campaign. - `timewarp` (boolean, optional) — Send this campaign using [Timewarp](https://mailchimp.com/help/use-timewarp/). - `title` (string, optional) — The title of the campaign. - `to_name` (string, optional) — The campaign's custom 'To' name. Typically the first name [audience field](https://mailchimp.com/help/getting-started-with-merge-tags/). - `use_conversation` (boolean, optional) — Use Mailchimp Conversation feature to manage replies. ### CampaignSocialCard The preview for the campaign, rendered by social networks like Facebook and Twitter. [Learn more](https://mailchimp.com/help/enable-and-customize-social-cards/). - `description` (string, optional) — A short summary of the campaign to display. - `image_url` (string, optional) — The url for the header image for the card. - `title` (string, optional) — The title for the card. Typically the subject line of the campaign. ### CampaignTrackingOptions The tracking options for a campaign. - `capsule` (CampaignTrackingOptionsCapsule, optional) — Deprecated - `clicktale` (string, optional) — The custom slug for [ClickTale](https://mailchimp.com/help/additional-tracking-options-for-campaigns/) tracking (max of 50 bytes). - `ecomm360` (boolean, optional) — Whether to enable e-commerce tracking. - `goal_tracking` (boolean, optional) — Deprecated - `google_analytics` (string, optional) — The custom slug for [Google Analytics](https://mailchimp.com/help/integrate-google-analytics-with-mailchimp/) tracking (max of 50 bytes). - `html_clicks` (boolean, optional) — Whether to [track clicks](https://mailchimp.com/help/enable-and-view-click-tracking/) in the HTML version of the campaign. Defaults to `true`. Cannot be set to false for variate campaigns. - `opens` (boolean, optional) — Whether to [track opens](https://mailchimp.com/help/about-open-tracking/). Defaults to `true`. Cannot be set to false for variate campaigns. - `salesforce` (CampaignTrackingOptionsSalesforce, optional) — Deprecated - `text_clicks` (boolean, optional) — Whether to [track clicks](https://mailchimp.com/help/enable-and-view-click-tracking/) in the plain-text version of the campaign. Defaults to `true`. Cannot be set to false for variate campaigns. ### CampaignVariateSettings The settings specific to A/B test campaigns. - `winner_criteria` (enum, required) — 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. - Allowed values: `opens`, `clicks`, `manual`, `total_revenue` - `combinations` (list of CampaignVariateSettingsCombinationsItems, optional) — Combinations of possible variables used to build emails. - `contents` (list of string, optional) — Descriptions of possible email contents. To set campaign contents, make a PUT request to /campaigns/\{campaign\_id}/content with the field 'variate\_contents'. - `from_names` (list of string, optional) — 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` (list of string, optional) — The possible reply-to addresses. The number of reply_to_addresses provided must match the number of from_names. If no reply_to_addresses are provided, settings.reply_to will be used. - `send_times` (list of datetime, optional) — 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. - `subject_lines` (list of string, optional) — The possible subject lines to test. If no subject lines are provided, settings.subject_line will be used. - `test_size` (integer, optional) — The percentage of recipients to send the test combinations to, must be a value between 10 and 100. - `wait_time` (integer, optional) — 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. - `winning_campaign_id` (string, optional) — ID of the campaign that was sent to the remaining recipients based on the winning combination. - `winning_combination_id` (string, optional) — ID for the winning combination. ### CampaignRecipientsSegmentOpts An object representing all segmentation options. This object should contain a `saved_segment_id` to use an existing segment, or you can create a new segment by including both `match` and `conditions` options. - `conditions` (list of SegmentTypeItems, optional) — Segment match conditions. There are multiple possible types, see the [condition types documentation](https://mailchimp.com/developer/marketing/docs/alternative-schemas/#segment-condition-schemas). - `match` (enum, optional) — Segment match type. - Allowed values: `any`, `all` - `prebuilt_segment_id` (string, optional) — The prebuilt segment id, if a prebuilt segment has been designated for this campaign. - `saved_segment_id` (CampaignRecipientsSegmentOptsSavedSegmentId, optional) — The id for an existing saved segment. ### CampaignReportSummaryEcommerce E-Commerce stats for a campaign. - `total_orders` (integer, optional) — The total orders for a campaign. - `total_revenue` (double, optional) — The total revenue for a campaign. Calculated as the sum of all order totals minus shipping and tax totals. - `total_spent` (double, optional) — The total spent for a campaign. Calculated as the sum of all order totals with no deductions. ### CampaignRssOptsSchedule The schedule for sending the RSS Campaign. - `daily_send` (CampaignRssOptsScheduleDailySend, optional) — The days of the week to send a daily RSS Campaign. - `hour` (integer, optional) — 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](https://mailchimp.com/help/set-account-details/). - `monthly_send_date` (double, optional) — The day of the month to send a monthly RSS Campaign. Acceptable days are 0-31, 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. - `weekly_send_day` (enum, optional) — The day of the week to send a weekly RSS Campaign. - Allowed values: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday` ### CampaignTrackingOptionsCapsule Deprecated - `notes` (boolean, optional) — Update contact notes for a campaign based on subscriber email addresses. ### CampaignTrackingOptionsSalesforce Deprecated - `campaign` (boolean, optional) — Create a campaign in a connected Salesforce account. - `notes` (boolean, optional) — Update contact notes for a campaign based on subscriber email addresses. ### CampaignVariateSettingsCombinationsItems - `content_description` (integer, optional) — The index of `variate_settings.contents` used. - `from_name` (integer, optional) — The index of `variate_settings.from_names` used. - `id` (string, optional) — Unique ID for the combination. - `recipients` (integer, optional) — The number of recipients for this combination. - `reply_to` (integer, optional) — The index of `variate_settings.reply_to_addresses` used. - `send_time` (integer, optional) — The index of `variate_settings.send_times` used. - `subject_line` (integer, optional) — The index of `variate_settings.subject_lines` used. ### SegmentTypeItems ### CampaignRecipientsSegmentOptsSavedSegmentId The id for an existing saved segment. ### CampaignRssOptsScheduleDailySend The days of the week to send a daily RSS Campaign. - `friday` (boolean, optional) — Sends the daily RSS Campaign on Fridays. - `monday` (boolean, optional) — Sends the daily RSS Campaign on Mondays. - `saturday` (boolean, optional) — Sends the daily RSS Campaign on Saturdays. - `sunday` (boolean, optional) — Sends the daily RSS Campaign on Sundays. - `thursday` (boolean, optional) — Sends the daily RSS Campaign on Thursdays. - `tuesday` (boolean, optional) — Sends the daily RSS Campaign on Tuesdays. - `wednesday` (boolean, optional) — Sends the daily RSS Campaign on Wednesdays. ### Aim Segment Segment by interaction with a specific campaign. - `condition_type` (enum, optional) - Allowed values: `Aim` - `field` (enum, optional) — Segment by interaction with a specific campaign. - Allowed values: `aim` - `op` (enum, optional) — The status of the member with regard to their campaign interaction. One of the following: opened, clicked, was sent, didn't open, didn't click, or was not sent. - Allowed values: `open`, `click`, `sent`, `noopen`, `noclick`, `nosent` - `value` (string, optional) — Either the web id value for a specific campaign or 'any' to account for subscribers who have/have not interacted with any campaigns. ### Automation Segment Segment by interaction with an Automation workflow. - `field` (enum, required) — Segment by interaction with an Automation workflow. - Allowed values: `automation` - `op` (enum, required) — The status of the member with regard to the automation workflow. One of the following: has started the workflow, has completed the workflow, has not started the workflow, or has not completed the workflow. - Allowed values: `started`, `completed`, `not_started`, `not_completed` - `value` (string, required) — The web id for the automation workflow to segment against. - `condition_type` (enum, optional) - Allowed values: `Automation` ### Poll Activity Segment Segment by poll activity. - `field` (enum, required) — Segment by poll activity. - Allowed values: `poll` - `op` (enum, required) — Members have/have not interacted with a specific poll in a Mailchimp email. - Allowed values: `member`, `notmember` - `value` (double, required) — The id for the poll. - `condition_type` (enum, optional) - Allowed values: `CampaignPoll` ### Conversation Segment Segment by interaction with a campaign via Conversations. - `field` (enum, required) — Segment by interaction with a campaign via Conversations. - Allowed values: `conversation` - `op` (enum, required) — The status of a member's interaction with a conversation. One of the following: has replied or has not replied. - Allowed values: `member`, `notmember` - `value` (string, required) — The web id value for a specific campaign or 'any' to account for subscribers who have/have not interacted with any campaigns. - `condition_type` (enum, optional) - Allowed values: `Conversation` ### Date Segment Segment by a specific date field. - `field` (enum, required) — The type of date field to segment on: The opt-in time for a signup, the date the subscriber was last updated, or the date of their last ecomm purchase. - Allowed values: `timestamp_opt`, `info_changed`, `ecomm_date` - `op` (enum, required) — When the event took place: Before, after, is a specific date, is not a specific date, is blank, or is not blank. - Allowed values: `greater`, `less`, `is`, `not`, `blank`, `blank_not`, `within`, `notwithin` - `value` (string, required) — What type of data to segment on: a specific date, a specific campaign, or the last campaign sent. - `condition_type` (enum, optional) - Allowed values: `Date` - `extra` (string, optional) — When segmenting on 'date' or 'campaign', the date for the segment formatted as YYYY-MM-DD or the web id for the campaign. ### Email Client Segment Segment by use of a particular email client. - `field` (enum, required) — Segment by use of a particular email client. - Allowed values: `email_client` - `op` (enum, required) — The operation to determine whether we select clients that match the value, or clients that do not match the value. - Allowed values: `client_is`, `client_not` - `value` (string, required) — The name of the email client. - `condition_type` (enum, optional) - Allowed values: `EmailClient` ### Language Segment Segment by language. - `field` (enum, required) — Segmenting based off of a subscriber's language. - Allowed values: `language` - `op` (enum, required) — Whether the member's language is or is not set to a specific language. - Allowed values: `is`, `not` - `value` (string, required) — A two-letter language identifier. - `condition_type` (enum, optional) - Allowed values: `Language` ### Member Rating Segment Segment by member rating. - `field` (enum, required) — Segment by member rating. - Allowed values: `rating` - `op` (enum, required) — Members who have have a rating that is/not exactly a given number or members who have a rating greater/less than a given number. - Allowed values: `is`, `not`, `greater`, `less` - `value` (SegmentTypeItemsOneOf7Value, required) - `condition_type` (enum, optional) - Allowed values: `MemberRating` ### Signup Source Segment Segment by signup source. - `condition_type` (enum, required) - Allowed values: `SignupSource` - `field` (enum, required) - Allowed values: `source` - `op` (enum, required) — Whether the member's signup source was/was not a particular value. - Allowed values: `source_is`, `source_not` - `value` (string, optional) — The signup source. ### Survey Monkey Segment Segment by interaction with a SurveyMonkey survey. - `field` (enum, required) — Segment by interaction with a SurveyMonkey survey. - Allowed values: `survey_monkey` - `op` (enum, required) — The status of the member with regard to the survey.One of the following: has started the survey, has completed the survey, has not started the survey, or has not completed the survey. - Allowed values: `started`, `completed`, `not_started`, `not_completed` - `value` (string, required) — The unique ID of the survey monkey survey. - `condition_type` (enum, optional) - Allowed values: `SurveyMonkey` ### VIP Segment Segment by VIP status. - `field` (enum, required) — Segment by VIP status. - Allowed values: `gmonkey` - `op` (enum, required) — Whether the member is or is not marked as VIP. - Allowed values: `member`, `notmember` - `condition_type` (enum, optional) - Allowed values: `VIP` ### Interests Segment Segment by an interest group merge field. - `condition_type` (enum, optional) - Allowed values: `Interests` - `field` (string, optional) — Segmenting based on interest group information. This should start with 'interests-' followed by the grouping id. Ex. 'interests-123'. - `op` (enum, optional) — Whether the member is a part of one, all, or none of the groups. - Allowed values: `interestcontains`, `interestcontainsall`, `interestnotcontains` - `value` (list of string, optional) — An array containing strings, each representing a group id. ### Ecommerce Category Segment Segment by purchases in specific items or categories. - `condition_type` (enum, optional) - Allowed values: `EcommCategory` - `field` (enum, optional) — Segment by purchases in specific items or categories. - Allowed values: `ecomm_cat`, `ecomm_prod` - `op` (enum, optional) — A member who has purchased from a category/specific item that is/is not a specific name, where the category/item name contains/doesn't contain a specific phrase or string, or a category/item name that starts/ends with a string. - Allowed values: `is`, `not`, `contains`, `notcontain`, `starts`, `ends` - `value` (string, optional) — The ecommerce category/item information. ### Ecommerce Number Segment Segment by average spent total, number of orders, total number of products purchased, or average number of products per order. - `field` (enum, required) — Segment by average spent total, number of orders, total number of products purchased, or average number of products per order. - Allowed values: `ecomm_spent_avg`, `ecomm_orders`, `ecomm_prod_all`, `ecomm_avg_ord` - `op` (enum, required) — Members who have spent exactly, have not spent exactly, spent more, or spent less than the segment value. - Allowed values: `is`, `not`, `greater`, `less` - `value` (SegmentTypeItemsOneOf13Value, required) - `condition_type` (enum, optional) - Allowed values: `EcommNumber` ### Ecommerce Purchased Segment Segment by whether someone has purchased anything. - `condition_type` (enum, optional) - Allowed values: `EcommPurchased` - `field` (enum, optional) — Segment by whether someone has purchased anything. - Allowed values: `ecomm_purchased` - `op` (enum, optional) — Members who have have ('member') or have not ('notmember') purchased. - Allowed values: `member`, `notmember` ### Ecommerce Spent Segment Segment by amount spent on a single order or across all orders. - `condition_type` (enum, optional) - Allowed values: `EcommSpent` - `field` (enum, optional) — Segment by amount spent on a single order or across all orders. - Allowed values: `ecomm_spent_one`, `ecomm_spent_all` - `op` (enum, optional) — Members who have spent 'more' or 'less' than then specified value. - Allowed values: `greater`, `less` - `value` (SegmentTypeItemsOneOf15Value, optional) ### Ecommerce Purchased Store Segment Segment by purchases from a specific store. - `condition_type` (enum, optional) - Allowed values: `EcommStore` - `field` (enum, optional) — Segment by purchases from a specific store. - Allowed values: `ecomm_store` - `op` (enum, optional) — Members who have or have not purchased from a specific store. - Allowed values: `is`, `not` - `value` (string, optional) — The store id to segment against. ### Goal Activity Segment Segment by Goal activity. - `field` (enum, required) — Segment by Goal activity. - Allowed values: `goal` - `op` (enum, required) — Whether the website URL is/not exactly, contains/doesn't contain, starts with/ends with a string. - Allowed values: `is`, `goal_not`, `contains`, `goal_notcontain`, `starts`, `ends` - `value` (string, required) — The URL to check Goal activity against. - `condition_type` (enum, optional) - Allowed values: `GoalActivity` ### Goal Timestamp Segment Segment by most recent interaction with a website. - `field` (enum, required) — Segment by most recent interaction with a website. - Allowed values: `goal_last_visited` - `op` (enum, required) — Whether the website activity happened after, before, or at a given timestamp. - Allowed values: `greater`, `less`, `is` - `value` (string, required) — The date to check Goal activity against. - `condition_type` (enum, optional) - Allowed values: `GoalTimestamp` ### Similar Subscribers Segment Member Segment Segment by similar subscribers. - `field` (enum, required) — Segment by similar subscribers. - Allowed values: `fuzzy_segment` - `op` (enum, required) — Members who are/are not apart of a 'similar subscribers' segment. - Allowed values: `fuzzy_is`, `fuzzy_not` - `value` (SegmentTypeItemsOneOf19Value, required) - `condition_type` (enum, optional) - Allowed values: `FuzzySegment` ### Static Segment Member Segment Segment by a given static segment. - `field` (enum, required) — Segment by a given static segment. - Allowed values: `static_segment` - `op` (enum, required) — Members who are/are not apart of a static segment. - Allowed values: `static_is`, `static_not` - `value` (SegmentTypeItemsOneOf20Value, required) - `condition_type` (enum, optional) - Allowed values: `StaticSegment` ### Location-Based Segment Segment by a specific country or US state. - `field` (enum, required) — Segmenting subscribers who are within a specific location. - Allowed values: `ipgeo` - `op` (enum, required) — Segment members who are within a specific country or US state. - Allowed values: `ipgeocountry`, `ipgeonotcountry`, `ipgeostate`, `ipgeonotstate` - `value` (string, required) — The two-letter country code or US state abbreviation. - `condition_type` (enum, optional) - Allowed values: `IPGeoCountryState` ### Geolocation Segment Segment by a specific geographic region. - `addr` (string, required) — The address of the target location. - `field` (enum, required) — Segmenting subscribers who are within a specific location. - Allowed values: `ipgeo` - `lat` (string, required) — The latitude of the target location. - `lng` (string, required) — The longitude of the target location. - `op` (enum, required) — Segment members who are within a specific geographic region. - Allowed values: `ipgeoin`, `ipgeonotin` - `value` (integer, required) — The radius of the target location. - `condition_type` (enum, optional) - Allowed values: `IPGeoIn` ### US Zip Code Segment Segment by a specific US ZIP code. - `extra` (integer, required) — The zip code to segment against. - `field` (enum, required) — Segmenting subscribers who are within a specific location. - Allowed values: `ipgeo` - `op` (enum, required) — Segment members who are within a specific US zip code. - Allowed values: `ipgeoinzip` - `value` (integer, required) — The radius of the target location. - `condition_type` (enum, optional) - Allowed values: `IPGeoInZip` ### Unknown Location-Based Segment Segment members whose location information is unknown. - `field` (enum, required) — Segmenting subscribers who are within a specific location. - Allowed values: `ipgeo` - `op` (enum, required) — Segment members for which location information is unknown. - Allowed values: `ipgeounknown` - `condition_type` (enum, optional) - Allowed values: `IPGeoUnknown` ### Zip Code Location-Based Segment Segment by a specific US ZIP code. - `field` (enum, required) — Segmenting subscribers who are within a specific location. - Allowed values: `ipgeo` - `op` (enum, required) — Segment members who are/are not within a specific US zip code. - Allowed values: `ipgeoiszip`, `ipgeonotzip` - `value` (integer, required) — The 5-digit zip code. - `condition_type` (enum, optional) - Allowed values: `IPGeoZip` ### Social Profiles Age Segment Segment by age ranges in Social Profiles data. - `field` (enum, required) — Segment by age ranges in Social Profiles data. - Allowed values: `social_age` - `op` (enum, required) — Members who are/not the exact criteria listed. - Allowed values: `is`, `not` - `value` (enum, required) — The age range to segment. - Allowed values: `18-24`, `25-34`, `35-54`, `55+` - `condition_type` (enum, optional) - Allowed values: `SocialAge` ### Social Profiles Gender Segment Segment by listed gender in Social Profiles data. - `field` (enum, required) — Segment by listed gender in Social Profiles data. - Allowed values: `social_gender` - `op` (enum, required) — Members who are/not the exact criteria listed. - Allowed values: `is`, `not` - `value` (enum, required) — The Social Profiles gender to segment. - Allowed values: `male`, `female` - `condition_type` (enum, optional) - Allowed values: `SocialGender` ### Social Profiles Influence Segment Segment by influence rating in Social Profiles data. - `field` (enum, required) — Segment by influence rating in Social Profiles data. - Allowed values: `social_influence` - `op` (enum, required) — Members who have a rating that is/not or greater/less than the rating provided. - Allowed values: `is`, `not`, `greater`, `less` - `value` (double, required) — The Social Profiles influence rating to segment. - `condition_type` (enum, optional) - Allowed values: `SocialInfluence` ### Social Profiles Social Network Segment Segment by social network in Social Profiles data. - `field` (enum, required) — Segment by social network in Social Profiles data. - Allowed values: `social_network` - `op` (enum, required) — Members who are/not on a given social network. - Allowed values: `member`, `notmember` - `value` (enum, required) — The social network to segment against. - Allowed values: `twitter`, `facebook`, `linkedin`, `flickr`, `foursquare`, `lastfm`, `myspace`, `quora`, `vimeo`, `yelp`, `youtube` - `condition_type` (enum, optional) - Allowed values: `SocialNetworkMember` ### Social Profiles Social Network Follow Segment Segment by social network in Social Profiles data. - `field` (enum, required) — Segment by social network in Social Profiles data. - Allowed values: `social_network` - `op` (enum, required) — Members who are/not following a linked account on a given social network. - Allowed values: `follow`, `notfollow` - `value` (enum, required) — The social network to segment against. - Allowed values: `twitter_follow` - `condition_type` (enum, optional) - Allowed values: `SocialNetworkFollow` ### Address Merge Field Segment Segment by an address-type merge field. - `field` (string, required) — An address-type merge field to segment. - `op` (enum, required) — Whether the member's address merge field contains/does not contain a value or is/is not blank. - Allowed values: `contains`, `notcontain`, `blank`, `blank_not` - `condition_type` (enum, optional) - Allowed values: `AddressMerge` - `value` (string, optional) — The value to segment a text merge field with. ### Address/Zip Merge Field Segment Segment by an address-type merge field within a given distance. - `extra` (string, required) — The city or the zip being used to segment against. - `field` (string, required) — An address or zip-type merge field to segment. - `op` (enum, required) — Whether the member's address merge field is within a given distance from a city or zip. - Allowed values: `geoin` - `value` (string, required) — The distance from the city/zip. - `condition_type` (enum, optional) - Allowed values: `ZipMerge` ### Birthday Merge Field Segment Segment by a contact's birthday. - `field` (string, required) — A date merge field to segment. - `op` (enum, required) — Whether the member's birthday merge information is/is not a certain date or is/is not blank. - Allowed values: `is`, `not`, `blank`, `blank_not` - `condition_type` (enum, optional) - Allowed values: `BirthdayMerge` - `value` (string, optional) — A date to segment against (mm/dd). ### Date Merge Field Segment Segment by a given date merge field. - `field` (string, required) — A date merge field to segment. - `op` (enum, required) — Whether the member's merge information is/is not, is greater/less than a value or is/is not blank. - Allowed values: `is`, `not`, `less`, `blank`, `blank_not`, `greater` - `condition_type` (enum, optional) - Allowed values: `DateMerge` - `value` (string, optional) — A date to segment against. ### Dropdown/Radio Merge Field Segment An individual segment condition - `field` (string, required) — A merge field to segment. - `op` (enum, required) — Whether the member's merge information is/is not a value or is/is not blank. - Allowed values: `is`, `not`, `blank`, `blank_not`, `notcontain`, `contains` - `condition_type` (enum, optional) - Allowed values: `SelectMerge` - `value` (string, optional) — The value to segment a text merge field with. ### Text or Number Merge Field Segment Segment by a given text or number merge field. - `field` (string, required) — A text or number merge field to segment. - `op` (enum, required) — Whether the member's merge information is/is not, contains/does not contain, starts/ends with, or is greater/less than a value - Allowed values: `is`, `not`, `contains`, `notcontain`, `starts`, `ends`, `greater`, `less`, `blank`, `blank_not` - `condition_type` (enum, optional) - Allowed values: `TextMerge` - `value` (string, optional) — The value to segment a text or number merge field with. ### Email Segment Segment by email address. - `field` (enum, required) — Segmenting based off of a subscriber's email address. - Allowed values: `merge0`, `EMAIL` - `op` (enum, required) — Whether the email address is/not exactly, contains/doesn't contain, starts/ends with a string. - Allowed values: `is`, `not`, `contains`, `notcontain`, `starts`, `ends`, `greater`, `less` - `condition_type` (enum, optional) - Allowed values: `EmailAddress` - `value` (string, optional) — The value to compare the email against. ### Predicted Gender Segment Segment by predicted gender. - `field` (enum, required) — Segment by predicted gender. - Allowed values: `predicted_gender` - `op` (enum, required) — Members who are/not the exact criteria listed. - Allowed values: `is`, `not` - `value` (enum, required) — The predicted gender to segment. - Allowed values: `male`, `female` - `condition_type` (enum, optional) - Allowed values: `PredictedGender` ### Predicted Age Segment Segment by predicted age. - `field` (enum, required) — Segment by predicted age. - Allowed values: `predicted_age_range` - `op` (enum, required) — Members who are/not the exact criteria listed. - Allowed values: `is` - `value` (enum, required) — The predicted age to segment. - Allowed values: `18-24`, `25-34`, `35-44`, `45-54`, `55-64`, `65+` - `condition_type` (enum, optional) - Allowed values: `PredictedAge` ### New Subscribers Prebuilt Segment Segment by when people subscribed. - `condition_type` (enum, optional) - Allowed values: `NewSubscribers` - `field` (enum, optional) — Segment by when people subscribed. - Allowed values: `timestamp_opt` - `op` (enum, optional) — Whe the event took place, namely within a time frame. - Allowed values: `date_within` - `value` (string, optional) — What type of data to segment on: a specific date, a specific campaign, or the last campaign sent. ### SegmentTypeItemsOneOf7Value ### SegmentTypeItemsOneOf13Value ### SegmentTypeItemsOneOf15Value ### SegmentTypeItemsOneOf19Value ### SegmentTypeItemsOneOf20Value ## Examples **Response** ```json { "type": "regular", "_links": [ { "href": "string", "method": "GET", "rel": "string", "schema": "string", "targetSchema": "string" } ], "ab_split_opts": { "from_name_a": "string", "from_name_b": "string", "pick_winner": "opens", "reply_email_a": "string", "reply_email_b": "string", "send_time_a": "2024-01-15T09:30:00Z", "send_time_b": "2024-01-15T09:30:00Z", "send_time_winner": "string", "split_size": 1, "split_test": "subject", "subject_a": "string", "subject_b": "string", "wait_time": 1, "wait_units": "hours" }, "archive_url": "string", "content_type": "string", "create_time": "2024-01-15T09:30:00Z", "delivery_status": { "can_cancel": true, "emails_canceled": 1, "emails_sent": 1, "enabled": true, "status": "delivering" }, "emails_sent": 1, "id": "string", "long_archive_url": "string", "needs_block_refresh": true, "parent_campaign_id": "string", "recipients": { "list_id": "string", "list_name": "string", "recipient_count": 1, "segment_opts": { "conditions": [ { "condition_type": "Aim", "field": "aim", "op": "open", "value": "any" } ], "match": "any", "prebuilt_segment_id": "subscribers-female", "saved_segment_id": 1 }, "segment_text": "string" }, "report_summary": { "click_rate": 1.1, "clicks": 1, "ecommerce": { "total_orders": 1, "total_revenue": 1.1, "total_spent": 1.1 }, "open_rate": 1.1, "opens": 1, "subscriber_clicks": 1, "unique_opens": 1 }, "resendable": true, "rss_opts": { "feed_url": "string", "frequency": "daily", "constrain_rss_img": true, "last_sent": "2024-01-15T09:30:00Z", "schedule": { "daily_send": { "friday": true, "monday": true, "saturday": true, "sunday": true, "thursday": true, "tuesday": true, "wednesday": true }, "hour": 1, "monthly_send_date": 1.1, "weekly_send_day": "sunday" } }, "send_time": "2024-01-15T09:30:00Z", "settings": { "authenticate": true, "auto_fb_post": [ "string" ], "auto_footer": true, "auto_tweet": true, "drag_and_drop": true, "fb_comments": true, "folder_id": "string", "from_name": "string", "inline_css": true, "preview_text": "string", "reply_to": "string", "subject_line": "string", "template_id": 1, "timewarp": true, "title": "string", "to_name": "string", "use_conversation": true }, "social_card": { "description": "string", "image_url": "string", "title": "string" }, "status": "save", "tracking": { "capsule": { "notes": true }, "clicktale": "string", "ecomm360": true, "goal_tracking": true, "google_analytics": "string", "html_clicks": true, "opens": true, "salesforce": { "campaign": true, "notes": true }, "text_clicks": true }, "variate_settings": { "winner_criteria": "opens", "combinations": [ { "content_description": 1, "from_name": 1, "id": "string", "recipients": 1, "reply_to": 1, "send_time": 1, "subject_line": 1 } ], "contents": [ "string" ], "from_names": [ "string" ], "reply_to_addresses": [ "string" ], "send_times": [ "2024-01-15T09:30:00Z" ], "subject_lines": [ "string" ], "test_size": 1, "wait_time": 1, "winning_campaign_id": "string", "winning_combination_id": "string" }, "web_id": 1 } ``` **SDK Code** ```python import requests url = "https://api.mailchimp.com/3.0/lists/list_id/surveys/survey_id/actions/create-email" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.mailchimp.com/3.0/lists/list_id/surveys/survey_id/actions/create-email'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.mailchimp.com/3.0/lists/list_id/surveys/survey_id/actions/create-email" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.mailchimp.com/3.0/lists/list_id/surveys/survey_id/actions/create-email") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mailchimp.com/3.0/lists/list_id/surveys/survey_id/actions/create-email") .header("Authorization", "Bearer ") .asString(); ``` ```php request('POST', 'https://api.mailchimp.com/3.0/lists/list_id/surveys/survey_id/actions/create-email', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.mailchimp.com/3.0/lists/list_id/surveys/survey_id/actions/create-email"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.mailchimp.com/3.0/lists/list_id/surveys/survey_id/actions/create-email")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > Find all the Mailchimp API documentation and tools developers need to send marketing and transactional emails.