PHPackages                             rossbearman/laravel-active-campaign - 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. rossbearman/laravel-active-campaign

ActiveLibrary[API Development](/categories/api)

rossbearman/laravel-active-campaign
===================================

Add Active Campaign to your Laravel application.

v1.3.3(1mo ago)327.4k↓11.9%1[3 issues](https://github.com/rossbearman/laravel-active-campaign/issues)MITPHPPHP ^8.1

Since Feb 12Pushed 1y ago2 watchersCompare

[ Source](https://github.com/rossbearman/laravel-active-campaign)[ Packagist](https://packagist.org/packages/rossbearman/laravel-active-campaign)[ RSS](/packages/rossbearman-laravel-active-campaign/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (12)Versions (6)Used By (0)

Laravel ActiveCampaign
======================

[](#laravel-activecampaign)

[![Latest Stable Version](https://camo.githubusercontent.com/20f1f02f63d1a74a2f266347a244bfdd2fc5f545e602e5504ae51779c79741e4/68747470733a2f2f706f7365722e707567782e6f72672f726f7373626561726d616e2f6c61726176656c2d6163746976652d63616d706169676e2f762f737461626c653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rossbearman/laravel-active-campaign)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

This package provides a simple interface to the ActiveCampaign API v3. It is a continuation of the original laravel-active-campaign package by [Tjardoo/Label84](https://github.com/tjardoo) and can easily be [migrated](#migrating-from-label84activecampaign).

The package currently supports `Contacts`, `Custom Fields`, `Custom Fields Values`, `Tags` and `Lists`. Feel free to open a pull request to add support for other endpoints.

- [Laravel Support](#laravel-support)
- [Installation](#installation)
- [Migrating from Label84/ActiveCampaign](#migrating-from-label84activecampaign)
- [Usage](#usage)
- [Examples](#examples)
    - [Contacts](#contacts)
    - [Custom Fields](#custom-fields)
    - [Custom Field Values](#custom-field-values)
    - [Tags](#tags)
- [Code Quality](#code-quality)
- [License](#license)

Laravel Support
---------------

[](#laravel-support)

VersionRelease10.x1.311.x1.3.112.x1.3.2Installation
------------

[](#installation)

### 1. Install the package via composer

[](#1-install-the-package-via-composer)

```
composer require rossbearman/laravel-active-campaign
```

### 2. Publish the config file

[](#2-publish-the-config-file)

```
php artisan vendor:publish --provider="RossBearman\ActiveCampaign\ActiveCampaignServiceProvider" --tag="config"
```

### 3. Add the base URL and API key to your .env

[](#3-add-the-base-url-and-api-key-to-your-env)

```
ACTIVE_CAMPAIGN_BASE_URL=
ACTIVE_CAMPAIGN_API_KEY=
```

Migrating from Label84/ActiveCampaign
-------------------------------------

[](#migrating-from-label84activecampaign)

The only change required to migrate to v1.3 is replacing `Label84` with `RossBearman` in namespaces and requiring `rossbearman/laravel-active-campaign` instead of `label84/laravel-active-campaign` in your `composer.json` file.

Usage
-----

[](#usage)

- [Active Campaign API Documentation](https://developers.activecampaign.com/reference)
- [Active Campaign Contact API Documentation](https://developers.activecampaign.com/reference/contact)

Access via facade:

```
use RossBearman\ActiveCampaign\Facades\ActiveCampaign;

$contact = ActiveCampaign::contacts()->get(1);
```

Resolve directly out of the container:

```
use RossBearman\ActiveCampaign\ActiveCampaign;

$contact = resolve(ActiveCampaign::class)->contacts()->get(1);
```

Inject into a constructor or method via [automatic injection](https://laravel.com/docs/10.x/container#automatic-injection):

```
use RossBearman\ActiveCampaign\ActiveCampaign;

class ContactController extends Controller
{
    public function __construct(private readonly ActiveCampaign $activeCampaign) { }

    $this->activeCampaign->contacts()->get(1);
}
```

Examples
--------

[](#examples)

The following examples use the facade for simplicity and assume `RossBearman\ActiveCampaign\Facades\ActiveCampaign` has been imported.

### Contacts

[](#contacts)

#### Retrieve an existing contact

[](#retrieve-an-existing-contact)

```
$contact = ActiveCampaign::contacts()->get(1);
```

#### List all contact, search contacts, or filter contacts by query defined criteria

[](#list-all-contact-search-contacts-or-filter-contacts-by-query-defined-criteria)

See the API docs for a [full list of possible query parameters](https://developers.activecampaign.com/reference/list-all-contacts).

```
$contacts = ActiveCampaign::contacts()->list();
$contactByEmail = ActiveCampaign::contacts()->list('email=info@example.com');
$singleList = ActiveCampaign::contacts()->list('listid=1');
```

#### Create a new contact

[](#create-a-new-contact)

```
$contactId = ActiveCampaign::contacts()->create('info@example.com', [
    'firstName' => 'John',
    'lastName' => 'Doe',
    'phone' => '+3112345678',
]);
```

#### Create a contact if they don't exist, or update an existing contact

[](#create-a-contact-if-they-dont-exist-or-update-an-existing-contact)

```
$contact = ActiveCampaign::contacts()->sync('info@example.com', [
    'firstName' => 'John',
    'lastName' => 'Doe',
    'phone' => '+3112345678',
]);
```

#### Update an existing contact

[](#update-an-existing-contact)

```
use RossBearman\ActiveCampaign\DataObjects\ActiveCampaignContact;

$contact = new ActiveCampaignContact(
    id: 1,
    email: 'info@example.com',
    phone: '+3112345678',
    firstName: 'John',
    lastName: 'Deer',
);

ActiveCampaign::contacts()->update($contact);
```

#### Update the status of a contact on a list

[](#update-the-status-of-a-contact-on-a-list)

The status should be `1` for subscribed and `2` for unsubscribed

```
$contact = ActiveCampaign::contacts()->updateListStatus(
    contactId: 1,
    listId: 1,
    status: 1,
);
```

#### Delete an existing contact

[](#delete-an-existing-contact)

```
ActiveCampaign::contacts()->delete(1);
```

#### Add a tag to contact

[](#add-a-tag-to-contact)

```
$contactTagId = ActiveCampaign::contacts()->tag(
    id: 1,
    tagId: 20
);
```

#### Remove a tag from a contact

[](#remove-a-tag-from-a-contact)

```
ActiveCampaign::contacts()->untag(contactTagId: 2340);
```

### Custom Field Values

[](#custom-field-values)

#### Retrieve an existing field value

[](#retrieve-an-existing-field-value)

```
$fieldValue = ActiveCampaign::fieldValues()->get(50);
```

#### Create a field value

[](#create-a-field-value)

```
$fieldValueId = ActiveCampaign::fieldValues()->create(
    contactId: 1,
    fieldId: 50,
    value: 'active',
);
```

#### Update an existing field value

[](#update-an-existing-field-value)

```
use RossBearman\ActiveCampaign\DataObjects\ActiveCampaignFieldValue;

$fieldValue = new ActiveCampaignFieldValue(
    contactId: 1,
    field: 50,
    value: 'inactive',
);

ActiveCampaign::fieldValues()->update($fieldValue);
```

#### Delete an existing field value

[](#delete-an-existing-field-value)

```
ActiveCampaign::fieldValues()->delete(50);
```

### Custom Fields

[](#custom-fields)

#### Retrieve an existing field

[](#retrieve-an-existing-field)

```
$field = ActiveCampaign::fields()->get(1);
```

#### Create a field

[](#create-a-field)

```
$fieldId = ActiveCampaign::fields()->create(
    type: 'textarea',
    title: 'about',
    description: 'Short introduction',
);
```

#### Update an existing field

[](#update-an-existing-field)

```
use RossBearman\ActiveCampaign\DataObjects\ActiveCampaignField;

$fieldValue = new ActiveCampaignField(
    id: 1,
    type: 'textarea',
    title: 'about',
    description: 'Relevant skills',
);

ActiveCampaign::fields()->update($fieldValue);
```

#### Delete an existing field

[](#delete-an-existing-field)

```
ActiveCampaign::fields()->delete(1);
```

### Tags

[](#tags)

#### Retrieve an existing tag

[](#retrieve-an-existing-tag)

```
$tag = ActiveCampaign::tags()->get(100);
```

#### List all tags, optionally filtered by name

[](#list-all-tags-optionally-filtered-by-name)

```
$tags = ActiveCampaign::tags()->list();
$filteredTags = ActiveCampaign::tags()->list('test_');
```

#### Create a tag

[](#create-a-tag)

```
$tag = ActiveCampaign::tags()->create(
    name: 'test_tag',
    description: 'This is a new tag'
);
```

#### Update an existing tag

[](#update-an-existing-tag)

```
use RossBearman\ActiveCampaign\DataObjects\ActiveCampaignTag;

$tag = new ActiveCampaignTag(
    id: 100,
    name: 'test_tag',
    description: 'Another description',
);

ActiveCampaign::tags()->update($tag);
```

#### Delete an existing tag

[](#delete-an-existing-tag)

```
ActiveCampaign::tags()->delete(100);
```

Code Quality
------------

[](#code-quality)

```
./vendor/bin/phpstan analyse
```

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance44

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~193 days

Total

5

Last Release

54d ago

### Community

Maintainers

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

---

Top Contributors

[![tjardoo](https://avatars.githubusercontent.com/u/31533540?v=4)](https://github.com/tjardoo "tjardoo (29 commits)")[![rossbearman](https://avatars.githubusercontent.com/u/212036?v=4)](https://github.com/rossbearman "rossbearman (23 commits)")[![trippo](https://avatars.githubusercontent.com/u/497169?v=4)](https://github.com/trippo "trippo (6 commits)")[![davit-vardanyan](https://avatars.githubusercontent.com/u/1898639?v=4)](https://github.com/davit-vardanyan "davit-vardanyan (3 commits)")[![shoaibayaz](https://avatars.githubusercontent.com/u/38201211?v=4)](https://github.com/shoaibayaz "shoaibayaz (2 commits)")[![Jakoffe](https://avatars.githubusercontent.com/u/31653208?v=4)](https://github.com/Jakoffe "Jakoffe (1 commits)")[![voicecode-bv](https://avatars.githubusercontent.com/u/4598259?v=4)](https://github.com/voicecode-bv "voicecode-bv (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rossbearman-laravel-active-campaign/health.svg)

```
[![Health](https://phpackages.com/badges/rossbearman-laravel-active-campaign/health.svg)](https://phpackages.com/packages/rossbearman-laravel-active-campaign)
```

###  Alternatives

[spatie/laravel-query-builder

Easily build Eloquent queries from API requests

4.4k26.9M220](/packages/spatie-laravel-query-builder)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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