# API: Batch DNC (Do Not Contact) & Batch DELETE using EMAIL addresses

**URL:** https://forum.mautic.org/t/api-batch-dnc-do-not-contact-batch-delete-using-email-addresses/20961
**Category:** Ideas and Feature Requests
**Created:** [September 22, 2021, 6:36am UTC](https://forum.mautic.org/t/api-batch-dnc-do-not-contact-batch-delete-using-email-addresses/20961 "2021-09-22T06:36:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![omert](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/omert/32/10732_2.png) [@omert](https://forum.mautic.org/u/omert)
#### Post date: [September 22, 2021, 6:36am UTC](https://forum.mautic.org/t/api-batch-dnc-do-not-contact-batch-delete-using-email-addresses/20961/1 "2021-09-22T06:36:52Z")

</div>

My idea is:  
I would like to add an option either for the API itself or the API library to do BATCH DNC (Do Not Contact) and Batch DELETE using EMAIL addresses. Currently there is only an option to do Batch DELETE via MAUTIC IDs which doesn’t help me much and just complicates. And also the ‘addDNC’ procedure also only uses a MAUTIC ID and does them one at a time which is also non-helpful.  
My current way of doing things is via a Batch ADD Contacts w/ Custom Field marks which then add them to segments which are then dealt with either by an ongoing DNC campaign or a DELETE campaign.  
I want a more straightforward no-fuss API procedure which will do it all straight away, via multiple EMAIL addresses, without the need to rely on campaigns to handle it.

I think these groups of people would benefit from this idea:  
Developers, API users

Why I think they would benefit from this idea:  
Makes life simpler

Any code or resources to support this idea:

Are you willing to work on this idea?:

What skills and resources do you need to explore this further?

---

<div class="post-metadata">

### Author: ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)
#### Post date: [September 22, 2021, 10:49pm UTC](https://forum.mautic.org/t/api-batch-dnc-do-not-contact-batch-delete-using-email-addresses/20961/2 "2021-09-22T22:49:38Z")

</div>

Hi, I am not sure if I understand this correctly so maybe this is a stupid question, but why you just do not write the script using Mautic api library that gets Mautic ids for given email addresses and use existing library methods to delete / addDNC to contacts?

Also what you are asking for should be quite easy to implement with the custom plugin as well.
