rolandka rolandka - 1 year ago 113
reST (reStructuredText) Question

Check if an email address is already in a list using MailChimp API v3.0 without subscribing the email address

Is it possible to check whether the email is already in a list or not via the new MailChimp API v3.0?

I know I can make a post request to the

endpoint that returns a 400 Bad Request error if the email is in the list.
This is ok and it helps, but it does subscribe the email as well if it is not in there already.

My main goal is not to subscribe just to check.

Answer Source

The ID of the user is the MD5 hash of their email address. So make a call to /3.0/lists/<list_id>/members/<email_md5> -- if that returns a 404, the user isn't on your list. If you get a 200, the resulting object has a status field that will tell you whether the user is subscribed or not.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download