I experimented a bit with the API to create campaigns.
I used the data JSON of an existing one and send it to the API. The new campaign was created, but:
1.) all the nodes of the campaign ended up top left on the canvas (they still have the x,y coordinates, when I read the just created campaign via the API),
2.) they were not connected, although I send the “connections part” via API JSON payload (that is still inside the JSON payload when I read it again).
I wonder what the:
- campaignID within some events (long random string starting with “mautic_”) and sometimes the real short campaignID, and
- “_token” fields are used for and how they are generated.
Not supplying them ends up with error 400 trying to create the campaign.
Did someone successfully create a new campaign via API in the past? How did Maestro(?) do it - was it via API or via a Plugin with direct database access?