Content
Manage the HTML, plain-text, and template content for your Mailchimp campaigns.
Available methods
Get campaign content
GET /campaigns/{campaign_id}/content
Get the the HTML and plain-text content for a campaign.
Path parameters
campaign_id
The unique id for the campaign.
Query string parameters
fields
Type: Array
Title: Fields
Read only: false
A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
exclude_fields
Type: Array
Title: Exclude Fields
Read only: false
A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
Response body parameters
variate_contents
Type: Array
Title: Variate Contents
Read only: false
Content options for multivariate campaigns.
Show properties
content_label
Type: String
Title: Content Label
Read only: false
Label used to identify the content option.
plain_text
Type: String
Title: Plain Text
Read only: false
The plain-text portion of the campaign. If left unspecified, we’ll generate this automatically.
html
Type: String
Title: Campaign HTML
Read only: false
The raw HTML for the campaign.
plain_text
Type: String
Title: Plain Text
Read only: false
The plain-text portion of the campaign. If left unspecified, we’ll generate this automatically.
html
Type: String
Title: Campaign HTML
Read only: false
The raw HTML for the campaign.
archive_html
Type: String
Title: Campaign Archive HTML
Read only: false
The Archive HTML for the campaign.
_links
Type: Array
Title: Links
Read only: true
A list of link types and descriptions for the API schema documents.
Show properties
rel
Type: String
Title: Rel
Read only: true
As with an HTML ‘rel’ attribute, this describes the type of link.
href
Type: String
Title: Href
Read only: true
This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
method
Type: String
Title: Method
Read only: true
The HTTP method that should be used when accessing the URL defined in ‘href’.
Possible Values:
GET
POST
PUT
PATCH
DELETE
OPTIONS
HEAD
targetSchema
Type: String
Title: Target Schema
Read only: true
For GETs, this is a URL representing the schema that the response should conform to.
schema
Type: String
Title: Schema
Read 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.
Example request
curl --request GET \
--url 'https://usX.api.mailchimp.com/3.0/campaigns/42694e9e57/content' \
--user 'anystring:apikey' \
--include
Example response
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/json; charset=utf-8
Vary: Accept-Encoding
X-Request-Id: 3bd6c865-a2b1-4b1e-82a0-335906802e18
Link: <https://api.mailchimp.com/schema/3.0/Campaigns/Content/Collection.json>; rel="describedBy"
Date: Fri, 20 Nov 2015 21:21:25 GMT
Content-Length: 26051
Connection: keep-alive
{
"plain_text": "** Designing Your Email\n------------------------------------------------------------\n\n\n** Creating an elegant email is simple\n------------------------------------------------------------\n\nNow that you’ve selected a template to work with, drag in content blocks to define the structure of your message. Don’t worry, you can always delete or rearrange blocks as needed. Then click “Design” to define fonts, colors, and styles.\n\nNeed inspiration for your design? Here’s what other Mailchimp users are doing. (http://inspiration.mailchimp.com)\n\n============================================================\nCopyright © *|CURRENT_YEAR|* *|LIST:COMPANY|*, All rights reserved.\n*|IFNOT:ARCHIVE_PAGE|* *|LIST:DESCRIPTION|*\n\nOur mailing address is:\n*|LIST_ADDRESS|* *|END:IF|*\n\nWant to change how you receive these emails?\nYou can ** update your preferences (*|UPDATE_PROFILE|*)\nor ** unsubscribe from this list (*|UNSUB|*)\n\n*|IF:REWARDS|* *|REWARDS_TEXT|* *|END:IF|*",
"html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n \t<!-- NAME: 1 COLUMN - BANDED -->\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>*|MC:SUBJECT|*</title>\n \n <style type=\"text/css\">\n\t\tbody,#bodyTable,#bodyCell{\n\t\t\theight:100% !important;\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t\twidth:100% !important;\n\t\t}\n\t\ttable{\n\t\t\tborder-collapse:collapse;\n\t\t}\n\t\timg,a img{\n\t\t\tborder:0;\n\t\t\toutline:none;\n\t\t\ttext-decoration:none;\n\t\t}\n\t\th1,h2,h3,h4,h5,h6{\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t}\n\t\tp{\n\t\t\tmargin:1em 0;\n\t\t\tpadding:0;\n\t\t}\n\t\ta{\n\t\t\tword-wrap:break-word;\n\t\t}\n\t\t.ReadMsgBody{\n\t\t\twidth:100%;\n\t\t}\n\t\t.ExternalClass{\n\t\t\twidth:100%;\n\t\t}\n\t\t.ExternalClass,.ExternalClass p,.ExternalClass span,.ExternalClass font,.ExternalClass td,.ExternalClass div{\n\t\t\tline-height:100%;\n\t\t}\n\t\ttable,td{\n\t\t\tmso-table-lspace:0pt;\n\t\t\tmso-table-rspace:0pt;\n\t\t}\n\t\t#outlook a{\n\t\t\tpadding:0;\n\t\t}\n\t\timg{\n\t\t\t-ms-interpolation-mode:bicubic;\n\t\t}\n\t\tbody,table,td,p,a,li,blockquote{\n\t\t\t-ms-text-size-adjust:100%;\n\t\t\t-webkit-text-size-adjust:100%;\n\t\t}\n\t\t#bodyCell{\n\t\t\tpadding:0;\n\t\t}\n\t\t.mcnImage{\n\t\t\tvertical-align:bottom;\n\t\t}\n\t\t.mcnTextContent img{\n\t\t\theight:auto !important;\n\t\t}\n\t\tbody,#bodyTable{\n\t\t\tbackground-color:#F2F2F2;\n\t\t}\n\t\t#bodyCell{\n\t\t\tborder-top:0;\n\t\t}\n\t\th1{\n\t\t\tcolor:#606060 !important;\n\t\t\tdisplay:block;\n\t\t\tfont-family:Helvetica;\n\t\t\tfont-size:40px;\n\t\t\tfont-style:normal;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:125%;\n\t\t\tletter-spacing:-1px;\n\t\t\tmargin:0;\n\t\t\ttext-align:left;\n\t\t}\n\t\th2{\n\t\t\tcolor:#404040 !important;\n\t\t\tdisplay:block;\n\t\t\tfont-family:Helvetica;\n\t\t\tfont-size:26px;\n\t\t\tfont-style:normal;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:125%;\n\t\t\tletter-spacing:-.75px;\n\t\t\tmargin:0;\n\t\t\ttext-align:left;\n\t\t}\n\t\th3{\n\t\t\tcolor:#606060 !important;\n\t\t\tdisplay:block;\n\t\t\tfont-family:Helvetica;\n\t\t\tfont-size:18px;\n\t\t\tfont-style:normal;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:125%;\n\t\t\tletter-spacing:-.5px;\n\t\t\tmargin:0;\n\t\t\ttext-align:left;\n\t\t}\n\t\th4{\n\t\t\tcolor:#808080 !important;\n\t\t\tdisplay:block;\n\t\t\tfont-family:Helvetica;\n\t\t\tfont-size:16px;\n\t\t\tfont-style:normal;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:125%;\n\t\t\tletter-spacing:normal;\n\t\t\tmargin:0;\n\t\t\ttext-align:left;\n\t\t}\n\t\t#templatePreheader{\n\t\t\tbackground-color:#FFFFFF;\n\t\t\tborder-top:0;\n\t\t\tborder-bottom:0;\n\t\t}\n\t\t.preheaderContainer .mcnTextContent,.preheaderContainer .mcnTextContent p{\n\t\t\tcolor:#606060;\n\t\t\tfont-family:Helvetica;\n\t\t\tfont-size:11px;\n\t\t\tline-height:125%;\n\t\t\ttext-align:left;\n\t\t}\n\t\t.preheaderContainer .mcnTextContent a{\n\t\t\tcolor:#606060;\n\t\t\tfont-weight:normal;\n\t\t\ttext-decoration:underline;\n\t\t}\n\t\t#templateHeader{\n\t\t\tbackground-color:#FFFFFF;\n\t\t\tborder-top:0;\n\t\t\tborder-bottom:0;\n\t\t}\n\t\t.headerContainer .mcnTextContent,.headerContainer .mcnTextContent p{\n\t\t\tcolor:#606060;\n\t\t\tfont-family:Helvetica;\n\t\t\tfont-size:15px;\n\t\t\tline-height:150%;\n\t\t\ttext-align:left;\n\t\t}\n\t\t.headerContainer .mcnTextContent a{\n\t\t\tcolor:#6DC6DD;\n\t\t\tfont-weight:normal;\n\t\t\ttext-decoration:underline;\n\t\t}\n\t\t#templateBody{\n\t\t\tbackground-color:#FFFFFF;\n\t\t\tborder-top:0;\n\t\t\tborder-bottom:0;\n\t\t}\n\t\t.bodyContainer .mcnTextContent,.bodyContainer .mcnTextContent p{\n\t\t\tcolor:#606060;\n\t\t\tfont-family:Helvetica;\n\t\t\tfont-size:15px;\n\t\t\tline-height:150%;\n\t\t\ttext-align:left;\n\t\t}\n\t\t.bodyContainer .mcnTextContent a{\n\t\t\tcolor:#6DC6DD;\n\t\t\tfont-weight:normal;\n\t\t\ttext-decoration:underline;\n\t\t}\n\t\t#templateFooter{\n\t\t\tbackground-color:#F2F2F2;\n\t\t\tborder-top:0;\n\t\t\tborder-bottom:0;\n\t\t}\n\t\t.footerContainer .mcnTextContent,.footerContainer .mcnTextContent p{\n\t\t\tcolor:#606060;\n\t\t\tfont-family:Helvetica;\n\t\t\tfont-size:11px;\n\t\t\tline-height:125%;\n\t\t\ttext-align:left;\n\t\t}\n\t\t.footerContainer .mcnTextContent a{\n\t\t\tcolor:#606060;\n\t\t\tfont-weight:normal;\n\t\t\ttext-decoration:underline;\n\t\t}\n\t@media only screen and (max-width: 480px){\n\t\tbody,table,td,p,a,li,blockquote{\n\t\t\t-webkit-text-size-adjust:none !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\tbody{\n\t\t\twidth:100% !important;\n\t\t\tmin-width:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[class=mcnTextContentContainer]{\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnBoxedTextContentContainer{\n\t\t\tmax-width:100% !important;\n\t\t\tmin-width:100% !important;\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[class=mcpreview-image-uploader]{\n\t\t\twidth:100% !important;\n\t\t\tdisplay:none !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\timg[class=mcnImage]{\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[class=mcnImageGroupContentContainer]{\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnImageGroupContent]{\n\t\t\tpadding:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnImageGroupBlockInner]{\n\t\t\tpadding-bottom:0 !important;\n\t\t\tpadding-top:0 !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttbody[class=mcnImageGroupBlockOuter]{\n\t\t\tpadding-bottom:9px !important;\n\t\t\tpadding-top:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[class=mcnCaptionTopContent],table[class=mcnCaptionBottomContent]{\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[class=mcnCaptionLeftTextContentContainer],table[class=mcnCaptionRightTextContentContainer],table[class=mcnCaptionLeftImageContentContainer],table[class=mcnCaptionRightImageContentContainer],table[class=mcnImageCardLeftTextContentContainer],table[class=mcnImageCardRightTextContentContainer]{\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnImageCardLeftImageContent],td[class=mcnImageCardRightImageContent]{\n\t\t\tpadding-right:18px !important;\n\t\t\tpadding-left:18px !important;\n\t\t\tpadding-bottom:0 !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnImageCardBottomImageContent]{\n\t\t\tpadding-bottom:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnImageCardTopImageContent]{\n\t\t\tpadding-top:18px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnImageCardLeftImageContent],td[class=mcnImageCardRightImageContent]{\n\t\t\tpadding-right:18px !important;\n\t\t\tpadding-left:18px !important;\n\t\t\tpadding-bottom:0 !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnImageCardBottomImageContent]{\n\t\t\tpadding-bottom:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnImageCardTopImageContent]{\n\t\t\tpadding-top:18px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[class=mcnCaptionLeftContentOuter] td[class=mcnTextContent],table[class=mcnCaptionRightContentOuter] td[class=mcnTextContent]{\n\t\t\tpadding-top:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnCaptionBlockInner] table[class=mcnCaptionTopContent]:last-child td[class=mcnTextContent]{\n\t\t\tpadding-top:18px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnBoxedTextContentColumn]{\n\t\t\tpadding-left:18px !important;\n\t\t\tpadding-right:18px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=mcnTextContent]{\n\t\t\tpadding-right:18px !important;\n\t\t\tpadding-left:18px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[class=templateContainer]{\n\t\t\tmax-width:600px !important;\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\th1{\n\t\t\tfont-size:24px !important;\n\t\t\tline-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\th2{\n\t\t\tfont-size:20px !important;\n\t\t\tline-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\th3{\n\t\t\tfont-size:18px !important;\n\t\t\tline-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\th4{\n\t\t\tfont-size:16px !important;\n\t\t\tline-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[class=mcnBoxedTextContentContainer] td[class=mcnTextContent],td[class=mcnBoxedTextContentContainer] td[class=mcnTextContent] p{\n\t\t\tfont-size:18px !important;\n\t\t\tline-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttable[id=templatePreheader]{\n\t\t\tdisplay:block !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=preheaderContainer] td[class=mcnTextContent],td[class=preheaderContainer] td[class=mcnTextContent] p{\n\t\t\tfont-size:14px !important;\n\t\t\tline-height:115% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=headerContainer] td[class=mcnTextContent],td[class=headerContainer] td[class=mcnTextContent] p{\n\t\t\tfont-size:18px !important;\n\t\t\tline-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=bodyContainer] td[class=mcnTextContent],td[class=bodyContainer] td[class=mcnTextContent] p{\n\t\t\tfont-size:18px !important;\n\t\t\tline-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=footerContainer] td[class=mcnTextContent],td[class=footerContainer] td[class=mcnTextContent] p{\n\t\t\tfont-size:14px !important;\n\t\t\tline-height:115% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\ttd[class=footerContainer] a[class=utilityLink]{\n\t\t\tdisplay:block !important;\n\t\t}\n\n}</style></head>\n <body leftmargin=\"0\" marginwidth=\"0\" topmargin=\"0\" marginheight=\"0\" offset=\"0\" style=\"margin: 0;padding: 0;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #F2F2F2;height: 100% !important;width: 100% !important;\">\n <center>\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" height=\"100%\" width=\"100%\" id=\"bodyTable\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;margin: 0;padding: 0;background-color: #F2F2F2;height: 100% !important;width: 100% !important;\">\n <tr>\n <td align=\"center\" valign=\"top\" id=\"bodyCell\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;margin: 0;padding: 0;border-top: 0;height: 100% !important;width: 100% !important;\">\n <!-- BEGIN TEMPLATE // -->\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tr>\n <td align=\"center\" valign=\"top\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <!-- BEGIN PREHEADER // -->\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" id=\"templatePreheader\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FFFFFF;border-top: 0;border-bottom: 0;\">\n <tr>\n \t<td align=\"center\" valign=\"top\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"templateContainer\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tr>\n <td valign=\"top\" class=\"preheaderContainer\" style=\"padding-top: 9px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\"></td>\n </tr>\n </table>\n </td> \n </tr>\n </table>\n <!-- // END PREHEADER -->\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <!-- BEGIN HEADER // -->\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" id=\"templateHeader\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FFFFFF;border-top: 0;border-bottom: 0;\">\n <tr>\n <td align=\"center\" valign=\"top\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"templateContainer\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tr>\n <td valign=\"top\" class=\"headerContainer\" style=\"padding-top: 10px;padding-bottom: 10px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\"></td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n <!-- // END HEADER -->\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <!-- BEGIN BODY // -->\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" id=\"templateBody\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FFFFFF;border-top: 0;border-bottom: 0;\">\n <tr>\n <td align=\"center\" valign=\"top\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"templateContainer\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tr>\n <td valign=\"top\" class=\"bodyContainer\" style=\"padding-top: 10px;padding-bottom: 10px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"mcnTextBlock\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tbody class=\"mcnTextBlockOuter\">\n <tr>\n <td valign=\"top\" class=\"mcnTextBlockInner\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n \n <table align=\"left\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"mcnTextContentContainer\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tbody><tr>\n \n <td valign=\"top\" class=\"mcnTextContent\" style=\"padding-top: 9px;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #606060;font-family: Helvetica;font-size: 15px;line-height: 150%;text-align: left;\">\n \n <h1 style=\"margin: 0;padding: 0;display: block;font-family: Helvetica;font-size: 40px;font-style: normal;font-weight: bold;line-height: 125%;letter-spacing: -1px;text-align: left;color: #606060 !important;\">Designing Your Email</h1><h3 style=\"margin: 0;padding: 0;display: block;font-family: Helvetica;font-size: 18px;font-style: normal;font-weight: bold;line-height: 125%;letter-spacing: -.5px;text-align: left;color: #606060 !important;\">Creating an elegant email is simple</h3><p style=\"margin: 1em 0;padding: 0;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #606060;font-family: Helvetica;font-size: 15px;line-height: 150%;text-align: left;\">Now that you’ve selected a template to work with, drag in content blocks to define the structure of your message. Don’t worry, you can always delete or rearrange blocks as needed. Then click “Design” to define fonts, colors, and styles.</p><p style=\"margin: 1em 0;padding: 0;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #606060;font-family: Helvetica;font-size: 15px;line-height: 150%;text-align: left;\">Need inspiration for your design? <a href=\"http://inspiration.mailchimp.com\" class=\"mc-template-link\" style=\"word-wrap: break-word;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #6DC6DD;font-weight: normal;text-decoration: underline;\">Here’s what other Mailchimp users are doing.</a></p>\n </td>\n </tr>\n </tbody></table>\n \n </td>\n </tr>\n </tbody>\n</table></td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n <!-- // END BODY -->\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <!-- BEGIN FOOTER // -->\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" id=\"templateFooter\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #F2F2F2;border-top: 0;border-bottom: 0;\">\n <tr>\n <td align=\"center\" valign=\"top\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"templateContainer\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tr>\n <td valign=\"top\" class=\"footerContainer\" style=\"padding-top: 10px;padding-bottom: 10px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"mcnTextBlock\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tbody class=\"mcnTextBlockOuter\">\n <tr>\n <td valign=\"top\" class=\"mcnTextBlockInner\" style=\"mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n \n <table align=\"left\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"mcnTextContentContainer\" style=\"border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;\">\n <tbody><tr>\n \n <td valign=\"top\" class=\"mcnTextContent\" style=\"padding-top: 9px;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #606060;font-family: Helvetica;font-size: 11px;line-height: 125%;text-align: left;\">\n \n <em>Copyright © *|CURRENT_YEAR|* *|LIST:COMPANY|*, All rights reserved.</em>\n<br>\n*|IFNOT:ARCHIVE_PAGE|*\n *|LIST:DESCRIPTION|*\n <br>\n <br>\n <strong>Our mailing address is:</strong>\n <br>\n *|HTML:LIST_ADDRESS_HTML|* *|END:IF|*\n <br>\n <br>\n\tWant to change how you receive these emails?<br>\n You can <a href=\"*|UPDATE_PROFILE|*\" style=\"word-wrap: break-word;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #606060;font-weight: normal;text-decoration: underline;\">update your preferences</a> or <a href=\"*|UNSUB|*\" style=\"word-wrap: break-word;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #606060;font-weight: normal;text-decoration: underline;\">unsubscribe from this list</a>\n <br>\n <br>\n *|IF:REWARDS|* *|HTML:REWARDS|*\n*|END:IF|*\n </td>\n </tr>\n </tbody></table>\n \n </td>\n </tr>\n </tbody>\n</table></td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n <!-- // END FOOTER -->\n </td>\n </tr>\n </table>\n <!-- // END TEMPLATE -->\n </td>\n </tr>\n </table>\n </center>\n </body>\n</html>",
"_links": [
{
"rel": "parent",
"href": "https://usX.api.mailchimp.com/3.0/campaigns/42694e9e57",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Campaigns/Instance.json"
},
{
"rel": "self",
"href": "https://usX.api.mailchimp.com/3.0/campaigns/42694e9e57/content",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Campaigns/Content/Collection.json"
},
{
"rel": "create",
"href": "https://usX.api.mailchimp.com/3.0/campaigns/42694e9e57/content",
"method": "PUT",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Campaigns/Content/Create.json"
}
]
}
Error response
type
Type: String
Title: Problem Type
Read only: false
An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
title
Type: String
Title: Error Title
Read only: false
A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
status
Type: Integer
Title: HTTP Status Code
Read only: false
The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
detail
Type: String
Title: Error Message
Read only: false
A human-readable explanation specific to this occurrence of the problem. Learn more about errors .
instance
Type: String
Title: Instance ID
Read only: false
A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
Set campaign content
PUT /campaigns/{campaign_id}/content
Set the content for a campaign.
Path parameters
campaign_id
The unique id for the campaign.
Request body parameters
plain_text
Type: String
Title: Plain Text
Read only: false
The plain-text portion of the campaign. If left unspecified, we’ll generate this automatically.
html
Type: String
Title: Campaign HTML
Read only: false
The raw HTML for the campaign.
url
Type: String
Title: Campaign URL
Read only: false
When importing a campaign, the URL where the HTML lives.
template
Type: Object
Title: Template Content
Read only: false
Use this template to generate the HTML content of the campaign
Show properties
id
Type: Integer
Title: Template ID
Read only: false
The id of the template to use.
sections
Type: Object
Title: Template Sections
Read only: false
Content for the sections of the template. Each key should be the unique mc:edit area name from the template.
archive
Type: Object
Title: Upload Archive
Read only: false
Available when uploading an archive to create campaign content. The archive should include all campaign content and images. Learn more .
Show properties
archive_content
Type: String
Title: Archive Content
Read only: false
The base64-encoded representation of the archive file.
archive_type
Type: String
Title: Archive Type
Read only: false
The type of encoded file. Defaults to zip.
Possible Values:
zip
tar.gz
tar.bz2
tar
tgz
tbz
variate_contents
Type: Array
Title: Variate Contents
Read only: false
Content options for Multivariate Campaigns . Each content option must provide HTML content and may optionally provide plain text. For campaigns not testing content, only one object should be provided.
Show properties
content_label
Type: String
Title: Content Label
Read only: false
The label used to identify the content option.
plain_text
Type: String
Title: Plain Text
Read only: false
The plain-text portion of the campaign. If left unspecified, we’ll generate this automatically.
html
Type: String
Title: Campaign HTML
Read only: false
The raw HTML for the campaign.
url
Type: String
Title: Campaign URL
Read only: false
When importing a campaign, the URL for the HTML.
template
Type: Object
Title: Template Content
Read only: false
Use this template to generate the HTML content for the campaign.
Show properties
id
Type: Integer
Title: Template ID
Read only: false
The id of the template to use.
sections
Type: Object
Title: Template Sections
Read only: false
Content for the sections of the template. Each key should be the unique mc:edit area name from the template.
archive
Type: Object
Title: Upload Archive
Read only: false
Available when uploading an archive to create campaign content. The archive should include all campaign content and images. Learn more .
Show properties
archive_content
Type: String
Title: Archive Content
Read only: false
The base64-encoded representation of the archive file.
archive_type
Type: String
Title: Archive Type
Read only: false
The type of encoded file. Defaults to zip.
Possible Values:
zip
tar.gz
tar.bz2
tar
tgz
tbz
Response body parameters
variate_contents
Type: Array
Title: Variate Contents
Read only: false
Content options for multivariate campaigns.
Show properties
content_label
Type: String
Title: Content Label
Read only: false
Label used to identify the content option.
plain_text
Type: String
Title: Plain Text
Read only: false
The plain-text portion of the campaign. If left unspecified, we’ll generate this automatically.
html
Type: String
Title: Campaign HTML
Read only: false
The raw HTML for the campaign.
plain_text
Type: String
Title: Plain Text
Read only: false
The plain-text portion of the campaign. If left unspecified, we’ll generate this automatically.
html
Type: String
Title: Campaign HTML
Read only: false
The raw HTML for the campaign.
archive_html
Type: String
Title: Campaign Archive HTML
Read only: false
The Archive HTML for the campaign.
_links
Type: Array
Title: Links
Read only: true
A list of link types and descriptions for the API schema documents.
Show properties
rel
Type: String
Title: Rel
Read only: true
As with an HTML ‘rel’ attribute, this describes the type of link.
href
Type: String
Title: Href
Read only: true
This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
method
Type: String
Title: Method
Read only: true
The HTTP method that should be used when accessing the URL defined in ‘href’.
Possible Values:
GET
POST
PUT
PATCH
DELETE
OPTIONS
HEAD
targetSchema
Type: String
Title: Target Schema
Read only: true
For GETs, this is a URL representing the schema that the response should conform to.
schema
Type: String
Title: Schema
Read 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.
Example request
curl --request PUT \
--url 'https://usX.api.mailchimp.com/3.0/campaigns/42694e9e57/content' \
--user 'anystring:apikey' \
--header 'content-type: application/json' \
--data '{"html": "<p>The HTML to use for the saved campaign<./p>"}' \
--include
Example response
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/json; charset=utf-8
Content-Length: 978
Vary: Accept-Encoding
X-Request-Id: e0e6dc64-089e-4663-8dac-41e59ccadac1
Link: <https://api.mailchimp.com/schema/3.0/Campaigns/Content/Collection.json>; rel="describedBy"
Date: Fri, 20 Nov 2015 21:28:03 GMT
Connection: keep-alive
{
"plain_text": "The HTML to use for the saved campaign<./p>\n\n==============================================\n*|LIST:DESCRIPTION|*\n\nUnsubscribe *|EMAIL|* from this list:\n*|UNSUB|*\n\nOur mailing address is:\n*|LIST:ADDRESS|*\n\nOur telephone:\n*|LIST:PHONE|*\n\nForward this email to a friend:\n*|FORWARD|*\n\nUpdate your profile:\n*|UPDATE_PROFILE|*",
"html": "<p>The HTML to use for the saved campaign<./p>",
"_links": [
{
"rel": "parent",
"href": "https://usX.api.mailchimp.com/3.0/campaigns/ca9bf30bd1",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Campaigns/Instance.json"
},
{
"rel": "self",
"href": "https://usX.api.mailchimp.com/3.0/campaigns/ca9bf30bd1/content",
"method": "GET",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Campaigns/Content/Collection.json"
},
{
"rel": "create",
"href": "https://usX.api.mailchimp.com/3.0/campaigns/ca9bf30bd1/content",
"method": "PUT",
"targetSchema": "https://api.mailchimp.com/schema/3.0/Campaigns/Content/Create.json"
}
]
}
Error response
type
Type: String
Title: Problem Type
Read only: false
An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
title
Type: String
Title: Error Title
Read only: false
A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
status
Type: Integer
Title: HTTP Status Code
Read only: false
The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
detail
Type: String
Title: Error Message
Read only: false
A human-readable explanation specific to this occurrence of the problem. Learn more about errors .
instance
Type: String
Title: Instance ID
Read only: false
A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.