How To Remove Contacts From Mailchimp

If you utilize Mailchimp for your email marketing efforts, it is likely that you will occasionally need to tidy up your contact list. One common task is deleting contacts. This blog post will provide instructions for removing contacts from Mailchimp.

Before we begin, please be aware that removing a contact completely deletes the contact from your audience. If you only want to remove a contact from a particular mailing list but still keep them in your audience, you might want to unsubscribe the contact instead of deleting.

Steps to Remove Contacts from Mailchimp

  1. Log in to your Mailchimp account and navigate to the Audience tab.
  2. In the Audience tab, select the View Contacts option. This will take you to a page listing all your contacts.
  3. Look for the contact you want to remove. You can search for a specific contact using the search bar at the top of the page.
  4. Once you have found the contact, click on the checkbox beside the contact’s name. You can select multiple contacts if you want to remove more than one.
  5. After you have selected all the contacts you wish to remove, click on the Actions dropdown menu at the top of the list, then select Delete.
  6. A confirmation window will appear, asking you if you’re sure you want to delete the contacts. Click on the Delete button to confirm.

Using the Mailchimp API

If you have a large number of contacts to remove and don’t want to do it manually, you might want to use the Mailchimp API. Below is a basic example of how to remove a contact using the Mailchimp API. Remember to replace ‘apikey’ with your actual API key and ‘list_id’ and ‘subscriber_hash’ with the appropriate values.

import requests

def remove_contact(apikey, list_id, subscriber_hash):
    url = f"{list_id}/members/{subscriber_hash}"
    headers = {"Authorization": "apiKey " + apikey}

    r = requests.delete(url, headers=headers)

    if r.status_code == 204:
        print("Contact successfully deleted.")
        print("Failed to delete contact. Status code:", r.status_code)

# Replace with your values
apikey = "your-api-key"
list_id = "your-list-id"
subscriber_hash = "subscriber-hash"

remove_contact(apikey, list_id, subscriber_hash)

Mailchimp remains a powerful tool for managing your email marketing campaigns. However, like any tool, it requires careful management to be at its most effective. Regularly updating and cleaning up your contact list is an essential part of this. Now you know how to remove contacts from your Mailchimp list, you can keep your campaigns targeted and relevant.