doom4
doom4

Reputation: 695

Mailchimp API v3: How to resend confirmation email if status pending or unsubscribe?

I was wondering if someones knows if just by using the API v3 it is possible to resend the confirmation email to users if they choose to resubscribe. So far I can't find a way other then using mailchimps own forms.

Cheers, Max

Upvotes: 4

Views: 2642

Answers (2)

Danny Felsteiner
Danny Felsteiner

Reputation: 1

If the status is currently pending, you can resend the confirmation email by setting the member's status to "unsubscribed", and then setting it to "pending" again.

Given that $audienceId contains the Id of your audience, and $email the email of the member you want to resend the confirmation:

$response = $client->lists->setListMember($audienceId, $email, [
    "email_address" => $email,
    "status" => "unsubscribed"
]);
                
            
$memberHash = $response->id;
$response = $client->lists->updateListMember($audienceId, $memberHash, [
    "status" => "pending"
]);     

Upvotes: 0

scoopzilla
scoopzilla

Reputation: 883

I don't believe it is possible from the Mailchimp end, as it does technically break a lot of their rules.

Mailchimp Resubscribe

Upvotes: 1

Related Questions