PHPackages                             craigballinger/mailchimp-api-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. craigballinger/mailchimp-api-php

ActiveLibrary[API Development](/categories/api)

craigballinger/mailchimp-api-php
================================

PHP wrapper for v2 of Mailchimp's API

02.2kPHP

Since Jul 19Pushed 12y ago1 watchersCompare

[ Source](https://github.com/craigballinger/mailchimp-api-php)[ Packagist](https://packagist.org/packages/craigballinger/mailchimp-api-php)[ RSS](/packages/craigballinger-mailchimp-api-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Mailchimp API v2 PHP Wrapper

This PHP library wraps version 2 of Mailchimp's API. The library closely follows the documentation at

\##Requirements

- PHP &gt;= 5.3
- cURL module

\##Version 0.9 This is wrapper is currently undergoing testing, and is considered beta, but will be in production shortly. Issues will be resolved quickly as they present themselves.

\##Convention Version 2 of Mailchimp's API is divided into nine sections: Campaigns, Ecomm, Folders, Lists, Helper, Reports, Templates, User and Vip. () This library implements each of those as properties of the client and can be accessed accordingly:

- $mc-&gt;campaigns-&gt;method();
- $mc-&gt;ecomm-&gt;method();

Methods and arguments are mapped identically to Mailchimp's API documentation so that should provide clear instruction on using this wrapper.

\##Usage

\###Create a New Campaign

```
$mc = new Mailchimp\Client('Api Key');

$result = $mc->campaigns->create(
                                'regular',
                                array(
                                        'list_id' => 'YOUR LIST ID',
                                        'subject' => 'Test Campaign '.date('m/d/y g:ia'),
                                        'from_email' => 'you@yourdomain.com',
                                        'from_name' => 'Test Sender',
                                        'to_name' => 'Test Recipient',
                                ),
                                array(  'html' => 'Test Campaign Message')
                              );

```

\###Send a Campaign

```
$mc = new Mailchimp\Client('Api Key');
$mc->campaigns->send($campaign_id);

```

\###oAuth2

Mailchimp allows you to use an oAuth2 token in place of an API Key, but the datacenter can't be extracted from an oAuth token, so you can set it as a second optional argument of the Mailchimp\\Client constructor.

```
$mc = new Mailchimp\Client('oAuth2 Token', 'us1');

```

If you don't know your datacenter, you can find out like this:

```
$mc = new Mailchimp\Client('oAuth2 Token');
$result = $mc->oauth2->metadata();
echo $result->dc;

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/890529?v=4)[Craig Ballinger](/maintainers/craigballinger)[@craigballinger](https://github.com/craigballinger)

### Embed Badge

![Health badge](/badges/craigballinger-mailchimp-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/craigballinger-mailchimp-api-php/health.svg)](https://phpackages.com/packages/craigballinger-mailchimp-api-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
