I would like to send example emails using the Mautic API. Unfortunately, I can’t find any documentation or any reference in the source code. Is this even possible or can someone give me a hint?
are you looking for a one email api call? Or a segment email creation?
Or sending an email that has an id already (template email) to an existing contact?
Thank you for your fast answer.
I’ve created a segment email via API. Sending to segments works fine. In the Mautic backend there is a button with “Send example”. This is the action I want to do with the API. It has not to be an existing contact. I just provide a list of email adresses, and the email will be sended.
I am not 100% sure, but sending an example email once you create via API call I do not think its possible. It does not seem that something like this would be relevant enough to enable (which is not to that is not relevant for you).
Well, I see two ways to solution here:
first is that for each email you create, you create also a dedicated segment with just one contact and you send example via Mautic Developer Documentation and even though this is real email it serves as an example.
the second way I see is that you create a custom api endpoint and use mautic core to implement that endpoint to send an example email.
At first glance it seems the first option is faster and requires less coding, the second option seems like you can actually send “real example” to the list of contacts.
I would prefer (besides the API would provide this function) the second way, as the email doesn’t need to be published. But thanks for the hint…
What if the email already exist as a template email?
Then you can use: