A Laravel wrapper for Campaign Monitor

v6.0.2 2024-03-15 23:14 UTC

This package is auto-updated.

Last update: 2024-03-15 23:18:21 UTC


Total Downloads

A Laravel wrapper for CampaignMonitor APIs


Pull in the package through Composer;

composer require bashy/laravel-campaignmonitor

If you have auto-discover for Laravel packages, please skip this. Add the service provider to config/app.php


This package has a Laravel facade. You can register it in the aliases array in the config/app.php file

'CampaignMonitor' => Bashy\CampaignMonitor\Facades\CampaignMonitor::class,

Publish the config file if you want to modify it.

$ php artisan vendor:publish --provider="Bashy\CampaignMonitor\CampaignMonitorServiceProvider"

And set your own API key and Client ID via .env or similar to match these.



You can find all the methods in their package campaignmonitor/createsend-php package.

Some examples;

// Add a subscriber to a list
$result = CampaignMonitor::subscribers('LIST_ID')->add([
    'EmailAddress' => '',
    'Name' => 'Ben',
    'ConsentToTrack' => 'No', // Yes, No, or Unchanged - now required by API v3.2
// Create a list for your client
$result = CampaignMonitor::lists()->create(config('campaignmonitor.client_id'), [
    'Title' => 'List name',

To send classic transactional emails

$data = [
    'From' => '',
    'To' => '',
    'ReplyTo' => '',
    'CC' => '',
    'BCC' => '',
    'HTML' => '<p>Hello there!</p>',
    'Text' => 'Hello there!',
    'ConsentToTrack' => 'No', // Yes, No, or Unchanged - now required by API v3.2