How to swap images in a template when creating an email using API?

Your software
My Mautic version is: 3.2.1

Your problem
My problem is: When creating an email using API, how can I swap an image of a template / theme?

Good day everyone. We have an entertainment video based site and I’m attempting to automate a process of scheduling notification emails to our subscribers whenever we publish a new video.

I see 2 things:
Create Email which takes Dynamic Content configureation
Create File which allows me to add a new file to mautics media library from what I can tell.

What I need to figure out is how to use the dynamic content when creating an email to swap out some pieces of text from a template as well as how to insert the image into the email during creation.

Thanks for the help in advance.

1 Like

Hey @MilesThatch,

Did you ever sort this issue out? What was your solution?

I’ve got a similar circumstance - actually seems even simpler than yours - where we’d like to just send out automatic emails when new articles are released, and take the “featured image” from the Wordpress Post and insert under email header, all with API.

Actually, all we really need is to update the src and href attributes for the header img. Just text…seems like a pretty simple task.

Did you have any luck on your end?

Thanks,
EP