Mautic Community Forums

Add ability to edit campaigns through the API

The edit campaign endpoint in the REST API is very limited: it only allows changing name, alias, description and isPublished. There’s no way to edit the actual campaign flowchart through the API.

Our use case is that we have a campaign that is re-used every few months to send 30+ emails, each scheduled on a particular date. To update the dates manually is tedious and error-prone. (The “after a relative time period” option doesn’t work for us, because late subscribers are not supposed to lag behind; they should receive each email at the same moment as everyone else.)

I appreciate that such an API will be more difficult to implement than simple scalar field editing, but it would be very useful for us.

Right now I have a snippet of JavaScript, which I paste into my browser’s developer console while I have the Campaign Builder open. It talks to the DOM to automate all the clicking and field editing, but of course it’s a horrid hack and might break with every new Mautic update.