PHPackages                             collinped/aimtell-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. collinped/aimtell-php

AbandonedArchivedLibrary

collinped/aimtell-php
=====================

PHP SDK for Aimtell

1.0.9(5y ago)03961MITPHPPHP ^7.4|^8.0

Since Dec 20Pushed 5y ago2 watchersCompare

[ Source](https://github.com/collinped/aimtell-php)[ Packagist](https://packagist.org/packages/collinped/aimtell-php)[ Docs](https://github.com/collinped/aimtell-php)[ GitHub Sponsors](https://github.com/sponsors/collinped)[ RSS](/packages/collinped-aimtell-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (11)Used By (1)

Aimtell PHP SDK
===============

[](#aimtell-php-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e9072992e21faccafc2d878b9bbe0d135642b6b10911279a0160bf3f62b7cdb7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6c6c696e7065642f61696d74656c6c2d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/collinped/aimtell-php)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c01242f29ad92b30e07e72209de0988e27b5cfbb69bcffecf75e283d0108e051/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f636f6c6c696e7065642f61696d74656c6c2d7068702f72756e2d74657374733f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/collinped/aimtell-php/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/f0cf86ebae3f1dde974f6d7e387c5b424c6b6dfe5d184c52b93ee41add0499e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6c6c696e7065642f61696d74656c6c2d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/collinped/aimtell-php)

[Aimtell](https://aimtell.com/) offers a service for push notifications to users who give permission. This package allows for interfacing with Aimtell's backend API to manage your account.

[Aimtell REST API Documentation](https://developers.aimtell.com/reference#authenticating-calls)

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

[](#installation)

You can install the package via composer:

```
composer require collinped/aimtell-php
```

Usage
-----

[](#usage)

#### Quick Example

[](#quick-example)

```
$aimtell = new Collinped\Aimtell($apiKey, $defaultSiteId, $whiteLabelId);

$site = $aimtell->site()
                ->create([
                    'name' => 'Sample Website',
                    'url' => 'collinped.com'
                ]);

$campaigns = $aimtell->site($siteId)
                     ->campaign()
                     ->all();

$campaign = $aimtell->site($siteId)
                    ->campaign()
                    ->find($campaignId);
```

### Authentication

[](#authentication)

- Get API Key
- Set API Key
- Get Default Site ID
- Set Default Site ID
- Get White Label ID
- Set White Label ID

### Sites

[](#sites)

- Get All Websites
- Get Website
- Get Website Code
- Add Website
- Update Website Details
- Get Website Settings
- Update Website Settings
- Update Website Package (Safari)
- Delete Website
- Get Website Keys
- Upsert Website Keys

### Subscribers

[](#subscribers)

- Get All Subscribers
- Get Subscriber
- Track Subscriber Attributes
- Track Subscriber Event
- Opt-Out Subscriber

### Segments

[](#segments)

- Get All Segments
- Get Segment
- Create Segment
- Update Segment
- Delete Segment
- Get Segment Counts Over Time (By Day)

### Welcome Notification Campaign

[](#welcome-notification-campaign)

- Get Welcome Notification
- Get Welcome Notification Campaign Results (By Day)
- Update Welcome Notification (Upsert)

### Manual Campaigns

[](#manual-campaigns)

- Get All Manual Campaigns
- Get Manual Campaign
- Get Manual Campaign Clicks
- Get Manual Campaign Results (By Day)
- Create Manual Campaign
- Update Manual Campaign
- Delete Manual Campaign

### Triggered Campaigns

[](#triggered-campaigns)

- Get All Event Triggered Campaigns
- Get Event Triggered Campaign
- Get Event Triggered Campaign Results (By Day)
- Create Event Triggered Campaign
- Update Event Triggered Campaign
- Delete Event Triggered Campaign

### RSS Campaigns

[](#rss-campaigns)

- Get All RSS Campaigns
- Get RSS Campaign
- Create RSS Campaign
- Update RSS Campaign
- Delete RSS Campaign

### API Campaigns

[](#api-campaigns)

- Get All API Campaigns
- Get API Campaign
- Get Event API Campaign Results (By Day)

### Send Push Notifications

[](#send-push-notifications)

- Send a Push Notification

### Authentication

[](#authentication-1)

#### Get API Key

[](#get-api-key)

```
$aimtell = $aimtell->getApiKey();
```

#### Set API Key

[](#set-api-key)

```
$aimtell = $aimtell->setApiKey($apiKey);
```

#### Get Default Site ID

[](#get-default-site-id)

```
$aimtell = $aimtell->getDefaultSiteId();
```

#### Set Default Site ID

[](#set-default-site-id)

```
$aimtell = $aimtell->setDefaultSiteId($defaultSiteId);
```

#### Get White Label ID

[](#get-white-label-id)

```
$aimtell = $aimtell->getWhiteLabelId();
```

#### Set White Label ID

[](#set-white-label-id)

```
$aimtell = $aimtell->setWhiteLabelId($whiteLabelId);
```

### Sites

[](#sites-1)

#### Get All Websites - [Aimtell Docs](https://developers.aimtell.com/reference#get-all-websites)

[](#get-all-websites---aimtell-docs)

```
$websites = $aimtell->site()
                    ->all();
```

#### Get Website - [Aimtell Docs](https://developers.aimtell.com/reference#api-get-website)

[](#get-website---aimtell-docs)

```
$website = $aimtell->site()
                   ->find($siteId);
```

#### Get Website Code - [Aimtell Docs](https://developers.aimtell.com/reference#get-website-code)

[](#get-website-code---aimtell-docs)

```
$website = $aimtell->site($siteId)
                   ->getCode();
```

#### Add Website - [Aimtell Docs](https://developers.aimtell.com/reference#add-website)

[](#add-website---aimtell-docs)

```
$websites = $aimtell->site()
                    ->create([
                        'name' => 'Website Name', // Required
                        'url' => 'facebook.com' // Required
                    ]);
```

#### Update Website Details - [Aimtell Docs](https://developers.aimtell.com/reference#update-website)

[](#update-website-details---aimtell-docs)

```
$websites = $aimtell->site($siteId)
                    ->update([
                        'name' => 'Website Name',
                        'url' => 'facebook.com'
                        'icon' => 'imageUrl.jpg'
                    ]);
```

#### Get Website Settings - [Aimtell Docs](https://developers.aimtell.com/reference#api-get-website-settings)

[](#get-website-settings---aimtell-docs)

```
$websites = $aimtell->site($siteId)
                    ->getSettings();
```

#### Update Website Settings - [Aimtell Docs](https://developers.aimtell.com/reference#update-website-settings)

[](#update-website-settings---aimtell-docs)

```
$websites = $aimtell->site($siteId)
                    ->updateSettings([
                        ...
                    ]);
```

#### Update Website Package (Safari) - [Aimtell Docs](https://developers.aimtell.com/reference#update-website-push-package-safari)

[](#update-website-package-safari---aimtell-docs)

```
$websites = $aimtell->site($siteId)
                    ->updatePackage();
```

#### Delete Website - [Aimtell Docs](https://developers.aimtell.com/reference#delete-website)

[](#delete-website---aimtell-docs)

```
$websites = $aimtell->site($siteId)
                    ->delete();
```

#### Get Website Keys - [Aimtell Docs](https://developers.aimtell.com/reference#api-get-website-keys)

[](#get-website-keys---aimtell-docs)

```
$websites = $aimtell->site($siteId)
                    ->getKeys();
```

#### Upsert Website Keys - [Aimtell Docs](https://developers.aimtell.com/reference#api-upsert-website-keys)

[](#upsert-website-keys---aimtell-docs)

```
$websites = $aimtell->site($siteId)
                    ->upsertKeys([
                        ...
                    ]);
```

### Subscribers

[](#subscribers-1)

#### Get All Subscribers - [Aimtell Docs](https://developers.aimtell.com/reference#get-subscribers)

[](#get-all-subscribers---aimtell-docs)

```
$subscribers = $aimtell->site($siteId)
                       ->subscriber()
                       ->all();
```

#### Get Subscriber - [Aimtell Docs](https://developers.aimtell.com/reference#get-subscriber)

[](#get-subscriber---aimtell-docs)

```
$subscriber = $aimtell->site($siteId)
                      ->subscriber()
                      ->find($subscriberId);
```

#### Track Subscriber Attribute - [Aimtell Docs](https://developers.aimtell.com/reference#api-track-subscriber-attribute)

[](#track-subscriber-attribute---aimtell-docs)

```
$subscriber = $aimtell->site($siteId)
                      ->subscriber($subscriberId)
                      ->trackEvent([
                          'first_name' => 'jeff'
                          'gender' => 'male'
                      ]);
```

#### Track Subscriber Event - [Aimtell Docs](https://developers.aimtell.com/reference#api-track-subscriber-event)

[](#track-subscriber-event---aimtell-docs)

```
$subscriber = $aimtell->site($siteId)
                      ->subscriber($subscriberId)
                      ->trackEvent([
                          'category' => '' // Required
                          'action' => '', // Required
                          'label' => '',
                          'value' => 1.00
                      ]);
```

#### Opt-Out Subscriber - [Aimtell Docs](https://developers.aimtell.com/reference#api-optout-subscriber)

[](#opt-out-subscriber---aimtell-docs)

```
$subscriber = $aimtell->site($siteId)
                      ->subscriber($subscriberId)
                      ->optOut();
```

### Segments

[](#segments-1)

#### Get All Segments - [Aimtell Docs](https://developers.aimtell.com/reference#get-available-segments)

[](#get-all-segments---aimtell-docs)

```
$segments = $aimtell->site($siteId)
                       ->segment()
                       ->all();
```

#### Get Segment - [Aimtell Docs](https://developers.aimtell.com/reference#get-segment)

[](#get-segment---aimtell-docs)

```
$segment = $aimtell->site($siteId)
                       ->segment()
                       ->find($segmentId);
```

#### Create Segment - [Aimtell Docs](https://developers.aimtell.com/reference#create-segment)

[](#create-segment---aimtell-docs)

```
$segment = $aimtell->site($siteId)
                       ->segment()
                       ->create([
                           'name' => 'Segment Name'
                           'definition' => 'city==Irvine' // See Aimtell Docs
                       ]);
```

#### Update Segment - [Aimtell Docs](https://developers.aimtell.com/reference#update-segment)

[](#update-segment---aimtell-docs)

```
$segment = $aimtell->site($siteId)
                       ->segment($segmentId)
                       ->update([
                           'name' => 'Segment Name'
                           'definition' => 'city==Irvine' // See Aimtell Docs
                       ]);
```

#### Delete Segment - [Aimtell Docs](https://developers.aimtell.com/reference#delete-segment)

[](#delete-segment---aimtell-docs)

```
$segment = $aimtell->site($siteId)
                       ->segment($segmentId)
                       ->delete();
```

#### Get Segment Counts Over Time (By Day) - [Aimtell Docs](https://developers.aimtell.com/reference#api-get-segment-counts-over-time)

[](#get-segment-counts-over-time-by-day---aimtell-docs)

```
$results = $aimtell->site($siteId)
                   ->segment($segmentId)
                   ->getResultsByDate([
                       'startDate' => '1/1/2020',
                       'endDate' => '1/30/2020'
                    ]);
```

### Welcome Notifications

[](#welcome-notifications)

#### Get Welcome Notification - [Aimtell Docs](https://developers.aimtell.com/reference#api-get-welcome-campaign)

[](#get-welcome-notification---aimtell-docs)

```
$welcomeNotification = $aimtell->site($siteId)
                               ->welcomeNotification()
                               ->get();
```

#### Get Welcome Notification Results (By Day) - [Aimtell Docs](https://developers.aimtell.com/reference#api-get-welcome-campaign-results-by-day)

[](#get-welcome-notification-results-by-day---aimtell-docs)

```
$results = $aimtell->site($siteId)
                   ->welcomeNotification()
                   ->getResultsByDate([
                       'startDate' => '1/1/2020',
                       'endDate' => '1/30/2020'
                    ]);
```

#### Update Welcome Notification (Upsert) - [Aimtell Docs](https://developers.aimtell.com/reference#api-upsert-welcome-campaign)

[](#update-welcome-notification-upsert---aimtell-docs)

```
$welcomeNotification = $aimtell->site($siteId)
                               ->welcomeNotification()
                               ->update([
                                   'title' => 'Welcome Title', // Required
                                   'body' => 'Welcome body', // Required
                                   'link' => 'http://facebook.com', // Required
                                   'status' => '1' // Required - 0 = Draft, 1 = Active
                               ]);
```

### Manual Campaigns

[](#manual-campaigns-1)

#### Get All Manual Campaigns - [Aimtell Docs](https://developers.aimtell.com/reference#get-all-campaigns)

[](#get-all-manual-campaigns---aimtell-docs)

```
$campaigns = $aimtell->site($siteId)
                     ->campaign()
                     ->all();
```

#### Get Manual Campaign - [Aimtell Docs](https://developers.aimtell.com/reference#get-campaign)

[](#get-manual-campaign---aimtell-docs)

```
$campaign = $aimtell->site($siteId)
                    ->campaign()
                    ->find($campaignId);
```

#### Get Manual Campaign Clicks - [Aimtell Docs](https://developers.aimtell.com/reference#get-campaign-clicks)

[](#get-manual-campaign-clicks---aimtell-docs)

```
$campaign = $aimtell->site($siteId)
                    ->campaign($campaignId)
                    ->getClicks();
```

#### Get Manual Campaign Results (By Day) - [Aimtell Docs](https://developers.aimtell.com/reference#get-manual-campaign-results-by-day)

[](#get-manual-campaign-results-by-day---aimtell-docs)

```
$campaign = $aimtell->site($siteId)
                    ->campaign($campaignId)
                    ->getResultsByDate([
                        'startDate' => '01/01/2020',
                        'endDate' => '02/15/2020',
                    ]);
```

#### Create Manual Campaign - [Aimtell Docs](https://developers.aimtell.com/reference#create-campaign)

[](#create-manual-campaign---aimtell-docs)

```
$campaign = $aimtell->site($siteId)
                    ->campaign($campaignId)
                    ->create([
                        'name' => 'Campaign Name', // Required
                        'title' => 'Campaign Title',
                        ...
                    ]);
```

#### Update Manual Campaign - [Aimtell Docs](https://developers.aimtell.com/reference#update-campaign)

[](#update-manual-campaign---aimtell-docs)

```
$campaign = $aimtell->site($siteId)
                    ->campaign($campaignId)
                    ->update([
                        'name' => 'New Campaign Name',
                        'title' => 'New Campaign Title',
                        ...
                    ]);
```

#### Delete Manual Campaign - [Aimtell Docs](https://developers.aimtell.com/reference#delete-campaign)

[](#delete-manual-campaign---aimtell-docs)

```
$campaign = $aimtell->site($siteId)
                    ->campaign($campaignId)
                    ->delete();
```

### Send Push Notifications

[](#send-push-notifications-1)

#### Send a Push Notification - [Aimtell Docs](https://developers.aimtell.com/reference#api-send-push-notification)

[](#send-a-push-notification---aimtell-docs)

```
$notification = $aimtell->site($siteId)
                        ->push()
                        ->title('Sample Notification')
                        ->message('Here is your sample message')
                        ->link('https://www.laravel.com')
                        ->toSubscriber($subscriberId)
                        ->withButton([
                            'link' => 'sampleUrl',
                            'title' => 'Sample Title 1',
                        ])
                        ->withButton([
                            'link' => 'sampleUrl2',
                            'title' => 'Sample Title 2',
                        ])
                        ->send();
```

Testing
-------

[](#testing)

```
composer test
```

Todo
----

[](#todo)

- A/B Tests for Manual Campaigns
- Create Manual Campaign (Batch)
- Update Manual Campaign (Batch)
- Delete Manual Campaign (Batch)
- Create Event Triggered Campaign (Batch)
- Update Event Triggered Campaign (Batch)
- Delete Event Triggered Campaign (Batch)
- Get Notification Logs
- Get Attributes Logs
- Get Pageview Logs
- Get Event Logs

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Collin Pedersen](https://github.com/collinped)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 87.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 ~1 days

Total

10

Last Release

1950d ago

### Community

Maintainers

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

---

Top Contributors

[![chrisob120](https://avatars.githubusercontent.com/u/2671929?v=4)](https://github.com/chrisob120 "chrisob120 (27 commits)")[![collinped](https://avatars.githubusercontent.com/u/53246524?v=4)](https://github.com/collinped "collinped (4 commits)")

---

Tags

aimtellaimtell-phpcollinped

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/collinped-aimtell-php/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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