PHPackages                             activecampaign/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. activecampaign/api-php

ActiveLibrary[API Development](/categories/api)

activecampaign/api-php
======================

Official PHP wrapper for the ActiveCampaign API.

v2.0.3(9y ago)1172.2M↑24.5%72[19 issues](https://github.com/ActiveCampaign/activecampaign-api-php/issues)[3 PRs](https://github.com/ActiveCampaign/activecampaign-api-php/pulls)11MITPHPPHP &gt;=5.3.0

Since May 27Pushed 4y ago66 watchersCompare

[ Source](https://github.com/ActiveCampaign/activecampaign-api-php)[ Packagist](https://packagist.org/packages/activecampaign/api-php)[ Docs](https://github.com/ActiveCampaign/activecampaign-api-php)[ RSS](/packages/activecampaign-api-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (19)Used By (11)

ActiveCampaign PHP API Wrapper
==============================

[](#activecampaign-php-api-wrapper)

This is the official PHP wrapper for the ActiveCampaign API. The purpose of these files is to provide a simple interface to the ActiveCampaign API. You are **not** required to use these files (in order to use the ActiveCampaign API), but it's recommended for a few reasons:

1. It's a lot easier to get set up and use (as opposed to coding everything from scratch on your own).
2. It's fully supported by ActiveCampaign, meaning we fix any issues immediately, as well as continually improve the wrapper as the software changes and evolves.
3. It's often the standard approach for demonstrating API requests when using ActiveCampaign support.

Both customers of our hosted platform and On-Site edition can use these files. On-Site customers should clone the source and switch to the ["onsite" branch](https://github.com/ActiveCampaign/activecampaign-api-php/tree/onsite), as that is geared towards the On-Site edition. Many features of the hosted platform are not available in the On-Site edition.

Installation
------------

[](#installation)

You can install **activecampaign-api-php** by [downloading (.zip)](https://github.com/ActiveCampaign/activecampaign-api-php/zipball/master) or cloning the source:

`git clone git@github.com:ActiveCampaign/activecampaign-api-php.git`

### Composer

[](#composer)

If you are using Composer, create your `composer.json` file ([example here](examples-composer/composer.json)).

Then load the `composer.phar` file in that directory:

`curl -sS https://getcomposer.org/installer | php`

Next, run install to load the ActiveCampaign library:

`php composer.phar install`

You should then see the `activecampaign` folder inside `vendor`.

[Read more about using Composer](https://getcomposer.org/doc/).

Example Usage
-------------

[](#example-usage)

### Composer

[](#composer-1)

In your script just include the `autoload.php` file to load all classes:

`require "vendor/autoload.php";`

Next, create a class instance of `ActiveCampaign`:

`$ac = new ActiveCampaign("API_URL", "API_KEY");`

That's it!

### includes/config.php

[](#includesconfigphp)

```
define("ACTIVECAMPAIGN_URL", "API_URL");
define("ACTIVECAMPAIGN_API_KEY", "API_KEY");

```

### examples.php

[](#examplesphp)

```
require_once("includes/ActiveCampaign.class.php");

$ac = new ActiveCampaign(ACTIVECAMPAIGN_URL, ACTIVECAMPAIGN_API_KEY);

// Adjust the default cURL timeout
$ac->set_curl_timeout(10);

$account = $ac->api("account/view");

```

Or just include everything in the same PHP file:

```
define("ACTIVECAMPAIGN_URL", "API_URL");
define("ACTIVECAMPAIGN_API_KEY", "API_KEY");
require_once("includes/ActiveCampaign.class.php");
$ac = new ActiveCampaign(ACTIVECAMPAIGN_URL, ACTIVECAMPAIGN_API_KEY);

// Adjust the default cURL timeout
$ac->set_curl_timeout(10);

$account = $ac->api("account/view");

```

See our [examples file](examples.php) for more in-depth samples.

Full Documentation
------------------

[](#full-documentation)

[Click here to view our full API documentation.](http://activecampaign.com/api)

Reporting Issues
----------------

[](#reporting-issues)

We'd love to help if you have questions or problems. Report issues using the [Github Issue Tracker](https://github.com/ActiveCampaign/activecampaign-api-php/issues) or email .

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity59

Moderate usage in the ecosystem

Community39

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 80.1% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~118 days

Recently: every ~58 days

Total

10

Last Release

3310d ago

Major Versions

v1.3.2 → v2.0.02016-09-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebb33c6591a057e51083ed031b7595c94a17b1e6624d69e70c9b05d0bbae0273?d=identicon)[activecampaign](/maintainers/activecampaign)

---

Top Contributors

[![mthommes](https://avatars.githubusercontent.com/u/634489?v=4)](https://github.com/mthommes "mthommes (161 commits)")[![MattThommes](https://avatars.githubusercontent.com/u/7694135?v=4)](https://github.com/MattThommes "MattThommes (12 commits)")[![cojamac](https://avatars.githubusercontent.com/u/13137288?v=4)](https://github.com/cojamac "cojamac (4 commits)")[![cgrama-ac](https://avatars.githubusercontent.com/u/172446623?v=4)](https://github.com/cgrama-ac "cgrama-ac (4 commits)")[![bryanagee](https://avatars.githubusercontent.com/u/290124?v=4)](https://github.com/bryanagee "bryanagee (4 commits)")[![w74](https://avatars.githubusercontent.com/u/7946048?v=4)](https://github.com/w74 "w74 (3 commits)")[![cristiangrama](https://avatars.githubusercontent.com/u/8570321?v=4)](https://github.com/cristiangrama "cristiangrama (3 commits)")[![srdjevic](https://avatars.githubusercontent.com/u/632492?v=4)](https://github.com/srdjevic "srdjevic (2 commits)")[![robhenley](https://avatars.githubusercontent.com/u/29806?v=4)](https://github.com/robhenley "robhenley (2 commits)")[![johnsome](https://avatars.githubusercontent.com/u/16687?v=4)](https://github.com/johnsome "johnsome (1 commits)")[![femiagbabiaka](https://avatars.githubusercontent.com/u/5712318?v=4)](https://github.com/femiagbabiaka "femiagbabiaka (1 commits)")[![rpalladino](https://avatars.githubusercontent.com/u/1429151?v=4)](https://github.com/rpalladino "rpalladino (1 commits)")[![jvandeboom](https://avatars.githubusercontent.com/u/563436?v=4)](https://github.com/jvandeboom "jvandeboom (1 commits)")[![djpm05](https://avatars.githubusercontent.com/u/5326377?v=4)](https://github.com/djpm05 "djpm05 (1 commits)")[![kidonchu](https://avatars.githubusercontent.com/u/1875398?v=4)](https://github.com/kidonchu "kidonchu (1 commits)")

---

Tags

automationemail marketingFormssubscribenewsletteremailsMarketing Automationactivecampaign

### Embed Badge

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

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

###  Alternatives

[jcalderonzumba/gastonjs

PhantomJS API based server for webpage automation

13111.1M72](/packages/jcalderonzumba-gastonjs)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[ahmadawais/sendy-php-api

Sendy PHP API Wrapper: Complete API interfacing.

8673.5k](/packages/ahmadawais-sendy-php-api)[kayedspace/laravel-n8n

A complete, expressive, and fluent Laravel client for the n8n public REST API and Webhooks Triggering.

1376.2k1](/packages/kayedspace-laravel-n8n)

PHPackages © 2026

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