May 5, 2015
Announcing MailChimp API v3.0
MailChimp’s API has come a long way since its 2007 debut. Two years in, it had nearly 20,000 users. After four years, we were processing 10 million requests per day. Now we handle more than 80 million requests every day from a quarter of a million users. These users are employing the API to subscribe people to their lists, sync their accounts with other web services, use our mobile apps, and send campaigns.
Today, we’re excited to announce the official release of MailChimp API v3.0. The new version is more organized and less confusing, with all the flexibility and power of previous versions. It has a few new features, with more on the way. For a detailed look at the changes, visit our developers blog. Here, we’ll walk you through the process that got us to v3.0, and give you a peek at what’s in it.
Last year, we surveyed some API users. The results were mostly encouraging, and more than 80% of the responses cited the API as a very important factor in choosing MailChimp. But not all of the reviews were positive, and we were left with the lingering question of why so few users transitioned from v1.3 to v2.0 back in 2013. When we looked into that, we learned that some developers found the API not-so-easy to use. For some of them, it was too complex—v2.0 of the API has more than 120 distinct endpoints (for comparison, there were 32 endpoints in v1.0). Others noted that the documentation was inaccurate in some places and vague in others. Most discouraging of all, we heard complaints about some bugs in the API behavior that were making it hard for people to get their work done.
At MailChimp, we’re committed to innovation and addicted to improving things for our users. So even though v2.0 was barely a year old, we realized it wasn’t as great as it could be, and we got started on a new version.
Experimenting with complexity
We knew the next version of the API had to be every bit as flexible and powerful as previous versions, because those characteristics are the foundation upon which so many great integrations are built. With that in mind, our first experiments were just small tweaks to v2.0’s structure. We tried to organize and simplify the different API calls, and we explored what it would take to guarantee that the documentation would always remain true to the API’s actual behavior. We hoped we would find a fast and easy miracle cure. Ultimately, those experiments failed. The API’s complexity was inherent in its design, and that complexity was the root of almost all of its problems.
The API needed major work. So we started reading—books, blogs, and Ph.D. theses were all on the docket, as was the documentation of other APIs. The finish line was still a long way off, but thanks to our extensive research, we came up with a plan that would let us build a more intuitive API from scratch. And we wanted to make sure we didn’t finish this project and find ourselves looking at another major rewrite 12 months later. We wanted to do it right.
Our new and improved API
Version 3.0 of the API has been through months of development and internal testing. We’ve had it in public beta for 2 months. With this launch, the API is stable enough that applications and integrations can start offering v3.0 functionality to their users. There are some major new features, too:
- List creation
- Adding people to your list in an ‘unsubscribed’ state (this is excellent if you’re joining us from another email service provider)
- API-triggered automation emails
- Ability to upload images to the file manager through the API
E-commerce and campaign editing tools are coming soon, and we’re always keeping an eye out for opportunities to add even more power to your MailChimp integrations.
If you want to take a deeper dive on the new features and the changes from v2.0, we’ve got you covered. For starters, our engineering blog gets into more of the technical details. And you can keep tabs on future API updates by following @MailChimp_API on Twitter or subscribing to our API Announcements mailing list.
Robert Dall
Can we have a better Signup Source then:
API – Generic
See Screenshot: https://cloudup.com/c7OC28Rn5Uq
Because when you have multiple sites that use the API. It doesn’t help you that much.
Also it would be nice if we could aggregate and sort “the source” So we could segment and send directly to people who signed up via a certain website. But right now the only value the API is returning is API – Generic. And that is less then helpful.
05.05.2015
Pete MailChimp
Hi Robert,
We hear you! “API Generic” is not as useful as it could be. We’ll look into making that a bit more flexible, but in the mean time there are two work-arounds that could suffice for folks who want a little more insight. The first is to use a hidden merge field to denote the specific API signup source. The second is to register separate applications for each website, and use OAuth2 API tokens instead of standard API keys. If you have other suggestions, please let us know! We really appreciate your feedback!
05.05.2015
Bjoern Sjut
I think the possibility to register applications that take care of the signup (and become the signup source) is really quite excellent – and very flexible.
05.05.2015
Robert Dall
Hi Pete
Since i use MailChimp for Gravity Forms on a WordPress CMS I would have to forward this on to them. But after an exhaustive chat with Trace yesterday, it would be in your hands to allow them to change this.
So please let me know when this changed and then I can inform Gravity Forms of the change and lobby them to get it implemented.
I would personally like to see the ability to see the website source with sub domain.
Signup Source: subdomain.domain.com
That way we can see what is coming in from what domain via the API, a direct List Import, a Facebook Sign Up, MailChimp hosted form or with Chimpadeedoo app.
We could then segment our list based on this if needed.
05.05.2015
Pete MailChimp
Ah! I see, that’s a slightly different use-case and the separate application trick might not work, but the hidden Merge Var field would. Still, I definitely agree that a most flexible and robust signup source could be a huge benefit. We’ll look into it!
05.05.2015
Bjoern Sjut
Pete, can you comment on how adding users in an unsubscribed state actually works and what the next step to make them a real subscriber is?
05.05.2015
Pete MailChimp
Sure! Typically if you add someone as unsubscribed, you wouldn’t want to then subscribe them (without their permission, of course!). In API v3, list status is just a field you can change, so to add someone to your list as unsubscribed, you’d just POST to /list/[list_id]/members and make sure you pass in “status” as “unsubscribed”. Adding as unsubscribed is most useful for making sure you respect those unsubs when importing from other email service providers. But, if they change their mind and you want to subscribe them, you can just PATCH /list/[list_id]/members/[md5_hash_of_their_email] with the JSON {“status”: “subscribed”}. I hope that helps!
05.05.2015
Bjoern Sjut
Thanks, that helps!
05.05.2015
Rajkumar
Hi,
When you are planning to retire the V2.0 ?
Based on that, we need to plan for the next version of our application
Thanks,
05.05.2015
Pete MailChimp
Hi Rajkumar! V2.0 and all prior versions will, at some point in the future, be retired. We don’t currently have a set date but there will be advanced warnings through both our @Mailchimp_API twitter account and in our API announcement email lists which you can sign up for here.
05.05.2015
Ted Wood @ The Digital Orchard
I’m glad to see v3 rolled out. I’m a bit dismayed that the Interest Grouping data model was not simplified. If anything it was made even more confusing. I exchanged some emails with the devs with a proposed solution for how to model the interests and the terminology to use, but it seems that they still can’t let go of some convoluted ways of seeing interest groups. The new v3 model uses a mix of terms: interests, categories, groups, items, titles, names…. a mix of words with overlapping meanings… and that leads to a very confusing API. Sure, the confusion of “groupings” vs “groups” was removed, but that was replaced with a different set of equally-confusing words. Let’s hope that I’m wrong and the new API model is easy to work with. :)
05.07.2015
Pete MailChimp
Hi Ted, thanks for your comment and for sharing your thoughts with the dev team during our design phase. There’s certainly going to be a learning period as we adjust to some new terminology, but we find that the new model more clearly and accurately represents MailChimp interest groups. We’re hoping to refocus around “interests” as the central component. “Categories” are simply sets of interests and “groups” are concrete lists of subscribers who have particular interests. We also hope that the focus on “interests” will make managing subscribers easier (you no longer need to know an interest’s category in order to update a user’s interests). In the process of redesigning the API for interest groups, we also learned some things about how those groups are used that might help us improve the feature (not just the API) in future versions. As with all software, our API is a work in progress. Give the new model a shot and definitely reach back out if you have additional feedback.
05.07.2015
Goutham
When do you plan to release the npm package for the new api?
05.07.2015
Pete MailChimp
Hi Goutham, we don’t have an ETA for wrapper libraries quite yet. We do want to be sure that code we release as “official” is high quality, though. We had numerous complaints that v2.0’s Node.js wrapper wasn’t written using Node best practices or idioms, so we’ll be taking some extra time to be sure we get that right this time around.
05.07.2015
Xiaobo
Is there any plan to release a python wrapper for API v3.0?
05.08.2015
Pete MailChimp
Hi, Xiaobo! We do plan to release a wrapper for Python (and Ruby and PHP and Node.js) but we don’t have an ETA for that yet.
05.08.2015
Xiaobo
Cool, thanks!
05.15.2015
Sven
Hi,
in order to use the API via Javascript in the browser, your API would need to answer OPTIONS requests and respond with “Access-Control-Allow-Origin” headers, which at the moment, you don’t do, if my tests are correct. Or perhaps I am missing something?!
Cold you perhaps look into that?
Thanks and cheers
Sven
05.13.2015
Pete MailChimp
Hi Sven!
Unfortunately, we do not support cross-site access. While there may be some circumstances in which exposing your API Key to the client isn’t a security risk, allowing client-side API access could encourage dangerous behavior by less security-aware developers. As a result, you’ll need to proxy your Javascript API requests through a server somewhere.
05.13.2015
Sven
Ok, thanks for the quick answer.
05.14.2015
Seb
Hi
I didn’t find Webhooks management in API v3. Is it implemented or planned ?
Thanks
05.25.2015
Pete MailChimp
Hi Seb!
Webhooks management is not yet implemented, but is planned!
05.28.2015
Seb
Hi Pete!
Thanks for your answer, good news !
I subscribed to the API newsletter, will it notify us when roadmap steps are done ?
I’ll continue to use API v2 for this feature (add & delete webhooks) since it occurs rarely in my soft.
05.29.2015
Costa
I’d love to know about Webhooks in v3 as well. Any word? Also, if we rely on v2 for now, do we need separate API keys? I’d like to keep track of unsubscribes as they happen. Perhaps there’s a better way to do this in v3 : )
Any help would rock!
03.12.2016
Ashley
is there going to be many changes to do with webhooks?
06.12.2015
Pete MailChimp
Hi Ashley,
We’re planning to take a fresh look at webhooks once the rest of API v3.0 is feature complete, but we don’t know how much change there will be. As with the API, however, we’ll continue to support the current webhooks if we release new ones.
06.18.2015
Seb
Hi Pete
Why API v3 calls are all logged as errors in Historical API calls ?
06.18.2015
Pete MailChimp
Hey Seb,
That’s just a bug on a page that needs a lot of work anyway; we’re looking into what sorts of things would make that page more useful.
06.18.2015
Krutarth
I am glad your API v.3.0 rolled out. But I have an issue with the webhooks in v3.0 and I am looking for technical assistance. It sometimes gives 2 or 3 response for same action, which fails my script sometimes. I can’t figure out why is it happening. Calling for HELP !!!
05.16.2016
Brandon MailChimp
Hey Krutarth, if you continue to experience an issue with the API, the best bet will bet to get in touch with our support team—they’ll be able to collect additional details from you and help get things sorted.
05.18.2016