How to set editable image in MailChimp template via API

I created a template with an editable image ("Editable Content Area"):

<img src="http://somewhere.com/foo.jpg" mc:edit="header_image">

When creating a new campaign, I can replace the image using the MailChimp editor. But I can not replace the image using the API .

If I include the image URL as the content of the section, it seems to be ignored, and the campaign is created without setting a new image URL.

    content: {
      sections: {
        header_image: "http://somewhere/else/bar.jpg",
        header: "Our latest newsletter",
        body: "<p>My fabulous content</p>",
        ... other named mc:edit section content ...
      }
    }

All other editable sections (text) are properly replaced.

Question. How to set tag URL with tags mc:editvia campaign / create API?

+4
source share
1 answer

, API MailChimp. .

, API.

:

content: {
  sections: {
    header_image: "<img src='http://somewhere.com/foo.jpg'>",
    header: "Our latest newsletter",
    body: "<p>My fabulous content</p>",
    ... other named mc:edit section content ...
  }
}
+4

All Articles