campaigns
Set campaign content
Set the content for a campaign.
put/3.0/campaigns/{campaign_id}/content
Request
- Base URLhttps://api.mailchimp.com
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://login.mailchimp.com/oauth2/authorizeToken URLhttps://login.mailchimp.com/oauth2/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
campaign_idstring required
The unique id for the campaign.
Request body
Example request
{
"archive_html": "<!DOCTYPE html><html xmlns=http://www.w3.org/1999/xhtml><head><meta http-equiv=Content-Type content=\"text/html; charset=UTF-8\"><title>My Subject</title><style type=text/css>body{background-color:#d0e4fe}</style><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0 offset=0>",
"variate_contents": [
{
"content_label": "Green header",
"html": "<!DOCTYPE html><html xmlns=http://www.w3.org/1999/xhtml><head><meta http-equiv=Content-Type content=\"text/html; charset=UTF-8\"><title>*|MC:SUBJECT|*</title><style type=text/css>body{background-color:#d0e4fe}</style><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0 offset=0>"
}
]
}Response
Example response
{
"archive_html": "<!DOCTYPE html><html xmlns=http://www.w3.org/1999/xhtml><head><meta http-equiv=Content-Type content=\"text/html; charset=UTF-8\"><title>My Subject</title><style type=text/css>body{background-color:#d0e4fe}</style><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0 offset=0>",
"variate_contents": [
{
"content_label": "Green header",
"html": "<!DOCTYPE html><html xmlns=http://www.w3.org/1999/xhtml><head><meta http-equiv=Content-Type content=\"text/html; charset=UTF-8\"><title>*|MC:SUBJECT|*</title><style type=text/css>body{background-color:#d0e4fe}</style><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0 offset=0>"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.