Skip to content

Users can't re-subscribe if they're already unsubscribed #75

@laulaz

Description

@laulaz

When someone tries to re-subscribe using the form, the request fails if the email already exists in Mailchimp with the status "unsubscribed".

Right now, the API is using POST /lists/{list_id}/members, which only works for new contacts.
If the email is already in the members list, Mailchimp returns this error:
400: is already a list member. Use PUT to insert or update list members.

We should update the logic to use a PUT request to modify the existing member and mark them as "subscribed" or "pending" (double opt-in).

Note that if the user was permanently deleted from the list (not just unsubscribed), Mailchimp doesn't allow them to be added again via the API. In that case, they have to re-subscribe manually through a Mailchimp signup form. That's a limitation on Mailchimp's side: https://mailchimp.com/help/delete-contacts/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions