Title: Programmatically create and delete lists
Last modified: July 12, 2020

---

# Programmatically create and delete lists

 *  Resolved [matgargano](https://wordpress.org/support/users/matgargano/)
 * (@matgargano)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/programmatically-create-and-delete-lists/)
 * I looked through the documentation and couldn’t find anything but wanted to double
   check before I look for another solution. I have a very special usecase where
   i want to have highly specific newsletters for highly specific (repeatable) events,
   but after the event ends I want to clear out the list and create a new list for
   the next event.
 * Is there any exposed programmatically way to create or delete lists on the fly?
   Subscribing is covered per the documentation.
 * Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/programmatically-create-and-delete-lists/#post-13114892)
 * lists are options of the subscriber. you can run a query removing the option 
   from a subscriber:
 * update wp_newsletter set list_N=0
 *  Thread Starter [matgargano](https://wordpress.org/support/users/matgargano/)
 * (@matgargano)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/programmatically-create-and-delete-lists/#post-13115748)
 * Hi. Can you give me a bit more concrete a of an example? Eg I want to create 
   a list called Reservation 7/15
 *  Thread Starter [matgargano](https://wordpress.org/support/users/matgargano/)
 * (@matgargano)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/programmatically-create-and-delete-lists/#post-13137547)
 * Checking back in here
 *  Thread Starter [matgargano](https://wordpress.org/support/users/matgargano/)
 * (@matgargano)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/programmatically-create-and-delete-lists/#post-13145393)
 * [@satollo](https://wordpress.org/support/users/satollo/) this was marked as resolved,
   can you please advise as it was not resolved 🙂
 *  Plugin Author [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/programmatically-create-and-delete-lists/#post-13146265)
 * Hi, you cannot create a list. You can define what is a list “X” in the lists 
   configuration panel. Then the field list_X on newsletter subscriber table tells
   if the subscriber is in that list (1) or not (0).
 * Please, check the lists panel and the database structure. If you’re looking for
   API to interact with lists, there are not, sorry.
 * Stefano.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Programmatically create and delete lists’ is closed to new replies.

 * ![](https://ps.w.org/newsletter/assets/icon-256x256.png?rev=1052028)
 * [Newsletter - Send awesome emails from WordPress](https://wordpress.org/plugins/newsletter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/newsletter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/newsletter/)
 * [Active Topics](https://wordpress.org/support/plugin/newsletter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/newsletter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/newsletter/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/programmatically-create-and-delete-lists/#post-13146265)
 * Status: resolved