Create campaigns from the API

  • 8 January 2019
  • 2 replies


Hi everyone,

I would like to know if there is a clean way to create a campaign from the API?

It's possible with the same method as the front: a simple POST resquest to{{report_id}}/triggers/set/ with form parameters. But to make this request we need to set a session ID on the Header and we don't have any clean method to get it.


2 replies

Userlevel 2

Hi @Blinard,

I use campaigns and one-off messaging a lot in my Mixpanel project and I am curious about this approach.

Why are you trying to send your message from the API instead of creating it within the UI?

I'd love to learn more!



@Blinard @donna.stephenson I would also like to have API control to create messages (not campaigns per se, just individual messages). We have monthly promos with a recurring intervals of push notifications and IAMs (e.g. "Sale starts now"/"Sale ends soon"). I'd love to be able to set everything up in our admin and have the messages generated automatically on MP.