Account exports
The basics
You can download your Mailchimp account’s data with a single request, via either the Mailchimp app or the Marketing API. The exported data—which will be provided as a .zip file—can include audiences, campaign content, template content, gallery assets, contact events, and both aggregate and granular reporting data for sent campaigns.
After an export is requested, it will build in the background for anywhere from a few minutes to (in rare cases) a few days. The eventual .zip can then be downloaded for up to 90 days.
In this doc we’ll explain how to make a request via the Account Exports endpoint, including the options for choosing which data should be included. We’ll also run through the limitations of the export functionality, and the error messages you may encounter if something goes wrong.
If you’d prefer to export via the Mailchimp app, follow the steps detailed here. (Note that only account Managers, Admins, or Owners can export via the app.
Generate a new export
When requesting a new export via the Account Exports endpoint, you’ll need:
- Your API key
- The category of data (the stage) you want included in the export
Requests to the Account Exports endpoint should be structured like so:
This example would generate an export containing all of a user’s contact data, as well as any image and content assets in their gallery.
API parameters
The include_stages parameter tells the API which categories of information you’d like in your final download. Each request must include at least one stage, but you can request as many as you’d like.
These stages are:
Time-limiting an export
If you’d like to limit your export to a specific date and time window, include the optional since_timestamp parameter. Passing an ISO8601 timestamp will limit the exported data to content generated after that specific time and date.
Say you wanted to pull all of an account’s contact data and content assets that were added after April 4, 2000, at midnight UTC. Your code might look like:
Downloading the data
To see and download all previous exports that have completed within the last 90 days, make a GET request to the Account Exports endpoint. This will allow you to iterate through and download any previously completed exports using the download_url property in each item of the response. Each download_url links out to a file hosted by Google, our storage provider.
Each file URL is signed, and only accessible through the given URL. Please keep this URL as private as your API key: it provides direct and unauthorized user access to your account’s data without any kind of user verification.
Limits on exports
The same export limits apply for both the Mailchimp app and the API: you can only generate one export at a time, and only one export can be generated per 24-hour period.
Via the API, when these limits come into play you’ll get a 400 exception status code, accompanied by one of the following error messages:
- Account Export in Progress: Another export is already in progress. Wait until it’s done before trying to begin another one.
- Too Many Account Exports: The last export attempt was less than 24 hours ago. Each export’s
finishedfield will be timestamped at completion, and 24 hours after that point another export may be requested.