How do I filter for Campaign Emails in the API?

Your software
My Mautic version is: 4.4.12

Your problem
I wonder how can I filter to receive only the Camapign emails via API? I did not find any hint in the developer API, nor did I find a way to create a search term for that in the frontend. If there was, I could use the search parameter in the API to retrieve it. Would be thankful for any hints.

Hi Martin,

  • to retrieve the emails via API, use /api/emails
  • to filter for a specific type, use “advanced filtering”: Mautic Developer Documentation
  • the key to filter for is emailType; possible values are list and template
  • to adjust your batch size, use the limit parameter.

Resulting example: <your host>/api/emails?where%5B0%5D%5Bcol%5D=emailType&where%5B0%5D%5Bexpr%5D=like&where%5B0%5D%5Bval%5D=list&limit=400

Hope this helps :slight_smile:

Thanks, that helped a lot! Got it to work now.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.