How to delete a user's email from a MailChimp list using the API/Gibbon?

677 Views Asked by At

I want to delete a user's email from my list in MailChimp using the API or Gibbon. However, there's no documentation about this in Gibbon repo.

As of now, I can only delete the email from the MailChimp website.

2

There are 2 best solutions below

1
Flo On

Would unsubscribe help you?

gibbon.lists(list_id).members(lower_case_md5_hashed_email_address).update(body: { status: "unsubscribed" })

Based on your comment and the mailchimp docs try:

gibbon.lists(list_id).members(lower_case_md5_hashed_email_address).delete
0
Sprachprofi On

I'm using this code; it works (Rails 5 / Gibbon 3.2.0):

Gibbon::Request.lists(list_id).members(lower_case_md5_hashed_email_address).delete