gbertl
gbertl

Reputation: 351

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

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.

Upvotes: 1

Views: 692

Answers (2)

Sprachprofi
Sprachprofi

Reputation: 1259

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

Upvotes: 1

Flo
Flo

Reputation: 540

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

Upvotes: 2

Related Questions