# How do I filter for Campaign Emails in the API?

**URL:** <https://forum.mautic.org/t/how-do-i-filter-for-campaign-emails-in-the-api/32961>\
**Category:** Product Support\
**Created:** [July 31, 2024, 1:23pm UTC](https://forum.mautic.org/t/how-do-i-filter-for-campaign-emails-in-the-api/32961 "2024-07-31T13:23:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [July 31, 2024, 1:23pm UTC](https://forum.mautic.org/t/how-do-i-filter-for-campaign-emails-in-the-api/32961/1 "2024-07-31T13:23:43Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [August 6, 2024, 6:53pm UTC](https://forum.mautic.org/t/how-do-i-filter-for-campaign-emails-in-the-api/32961/2 "2024-08-06T18:53:24Z")

</div>

Hi Martin,

- to retrieve the emails via API, use /api/emails
- to filter for a specific type, use “advanced filtering”: [Mautic Developer Documentation](https://developer.mautic.org/#advanced-filtering)
- 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 🙂

---

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [August 6, 2024, 7:52pm UTC](https://forum.mautic.org/t/how-do-i-filter-for-campaign-emails-in-the-api/32961/3 "2024-08-06T19:52:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [August 8, 2024, 7:53am UTC](https://forum.mautic.org/t/how-do-i-filter-for-campaign-emails-in-the-api/32961/4 "2024-08-08T07:53:11Z")

</div>

Closed on August 8, 2024, 7:53am UTC

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