When working with the Mailchimp API v3, you may encounter a 400 Bad Request error when trying to resubscribe a member who has been previously deleted. Below are the steps to reproduce this issue and guidance on how to address it.

Steps to Reproduce the Issue

  1. Subscribe a Member: Initially, add a member to your mailing list.

  2. Delete the Member: Remove that member from the list. This action may permanently delete the member, depending on the deletion method used.

  3. Attempt to Resubscribe: Use the following API endpoint to try resubscribing the member:

    PUT /lists/{list_id}/members/{subscriber_hash}

    Replace {list_id} with your specific list ID and {subscriber_hash} with the MD5 hash of the member's email address.

Example Request

Here’s an example of the request payload you might send:

{
  "email_address": "some@email.com",
  "status_if_new": "subscribed"
}

Expected Response

If the member has been permanently deleted, the API will respond with a 400 status code and a message similar to the following:

{
  "type": "http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/",
  "title": "Forgotten Email Not Subscribed",
  "status": 400,
  "detail": "some@email.com was permanently deleted and cannot be re-imported. The contact must re-subscribe to get back on the list."
}

Solution

To resolve this issue, the member must re-subscribe through a different method, such as a sign-up form, rather than attempting to resubscribe via the API after a permanent deletion. This is due to compliance with data handling regulations and Mailchimp's internal policies regarding deleted contacts. If you encounter this error, ensure that the member is aware they need to re-subscribe to your list directly.