Search for cleared / returned email addresses for a campaign or MailChimp list

I would like to automate the collection of unsubscribed and cleared email accounts for this campaign.

On the API playground, I see all the methods available in the List entity.

failure of mailing

I see this in the LIST API GET reports/xxxxxx/unsubscribed

purified

Where can I find cleared / rejected emails from a list or campaign? I know that I see the number of refusals in different places, but I would like to find email addresses that really bounce, as well as the names and surnames of the participant in the list. In essence, I would like the API to be the same as the โ€œexport cleaned to CSVโ€ available on the site.

How can I use the MailChimp 3.0 API for this?

methods on a list

+7
3

GET lists/list_id/members?status=unsubscribed

GET lists/list_id/members?status=cleaned

/

+3

:

GET /3.0/reports/campaign_id/email-activity

, type=bounce.

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

, MailChimp , 25 , 500 .

0

Since a soft bounce will not change statusinside the list (audience), to get soft bounce from the list without a special campaign, you can use

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

This endpoint will be returned for only one email (contact), so you need to iterate over all emails (contacts) in the list.

Answer example:

"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"
        }
    ],
0
source

Source: https://habr.com/ru/post/1617752/


All Articles