Finding cleaned/bounced email addresses for a MailChimp campaign or list

故事扮演 提交于 2019-12-04 04:01:41

You can do

GET lists/list_id/members?status=unsubscribed

to get unsubscribed users

GET lists/list_id/members?status=cleaned

to get cleaned/bounced users

For the bounced emails in a specific campaign you need to do this:

GET /3.0/reports/campaign_id/email-activity

and iterate though all recipients in the campaign, manually locating actions with type=bounce.

    {
        "email_address": "xxx@example.com",
        "activity": [
            {
                "action": "bounce",
                "type": "hard",
                "timestamp": "2019-04-08T00:00:00+00:00"
            }
        ]
    },

Unfortunately MailChimp has very bad performance on this endpoint, approximately 25 seconds to return activity for a campaign with 500 recipients.

Since soft bounce will not change status inside the list(audience), to get soft bounce email from the list without specific campaign, you can use

GET lists/{list-id}/members/{subscriber_hash}/activity

This endpoint will only return for single email(contact), so you need to iterate through all email(contact) in the list.

Sample response:

"activity": [
        {
            "action": "bounce",
            "timestamp": "2019-05-01T23:02:26+00:00",
            "type": "soft",
            "campaign_id": "xxxxxxxxxx",
            "title": "Xxxx Xxxxxxx"
        },
        {
            "action": "sent",
            "timestamp": "2019-05-01T23:00:00+00:00",
            "type": "regular",
            "campaign_id": "xxxxxxxxxx",
            "title": "Xxxx Xxxxxxx"
        }
    ],
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!