PHPackages                             nateritter/laravel-mautic-api - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. nateritter/laravel-mautic-api

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

nateritter/laravel-mautic-api
=============================

Free and Open Source Marketing Automation API (updated to support Laravel 5.7 by dgtal)

v1.2.3(7y ago)011MITPHPPHP &gt;=5.5.9

Since Nov 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nateritter/laravel-mautic-api)[ Packagist](https://packagist.org/packages/nateritter/laravel-mautic-api)[ RSS](/packages/nateritter-laravel-mautic-api/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (7)Used By (0)

Mautic API in Laravel/Lumen.
----------------------------

[](#mautic-api-in-laravellumen)

Free and Open Source Marketing Automation API

Requirements
------------

[](#requirements)

- PHP 5.5.\* or newer
- cURL support

Mautic Setup
------------

[](#mautic-setup)

The API must be enabled in Mautic. Within Mautic, go to the Configuration page (located in the Settings menu) and under API Settings enable Mautic's API. You can also choose which OAuth2 protocol to use here. After saving the configuration, go to the API Credentials page (located in the Settings menu) and create a new client. Enter the callback/redirect URI that the request will be sent from. Click Apply then copy the Client ID and Client Secret to the application that will be using the API.

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

[](#installation)

First, you'll need to require the package with Composer:

```
composer require nateritter/laravel-mautic-api
```

Aftwards, run `composer update` from your command line.

Then, update `config/app.php` by adding an entry for the service provider.

```
'providers' => [
	// ...
	'Princealikhan\Mautic\MauticServiceProvider',
],
```

Then, register class alias by adding an entry in aliases section

```
'aliases' => [
    //.....
    'Mautic' => 'Princealikhan\Mautic\Facades\Mautic',
],
```

Finally, from the command line run `php artisan vendor:publish` to publish the default configuration file. This will publish a configuration file name `mautic.php` ,`consumer migration` and `consumer model`.

Run `php artisan migrate` migration command to create consumer table in your database.

Configuration
-------------

[](#configuration)

You need to add your `client id`, `client secret` and `callback url` in `mautic.php` file that is found in your applications `config` directory.

Authorization
-------------

[](#authorization)

This Library only support OAuth2 Authorization you must need to create a OAuth2 client in order to use api.

Registering Application
-----------------------

[](#registering-application)

In order to register you application with mautic ping this url this is one time registration.

```
http://your-app/mautic/application/register
```

Usage
=====

[](#usage)

Add Mautic Facade in your controller.

```
use Mautic;
```

#### Send a request to mautic ( Example )

[](#send-a-request-to-mautic--example-)

Create a new contact in mautic.

```
$params = array(
    'firstname' => 'Prince',
    'lastname'=> 'Ali Khan',
    'email' => 'princealikhan08@gmail.com'
);

Mautic::request('POST','contacts/new',$param);
```

Get List of all contacts

```
Mautic::request('GET','contacts');
```

Get a unique contact

```
Mautic::request('GET','contacts/1');
//where 1 is unique id for a contact.
```

Delete a contact

```
Mautic::request('Delete','contacts/1/delete');
```

##### And many more endpoints support by mautic.

[](#and-many-more-endpoints-support-by-mautic)

### List of Endpoints supported by Mautic.

[](#list-of-endpoints-supported-by-mautic)

#### Contacts

[](#contacts)

```
[
    "contacts",
    "contacts/{id}",
    "contacts/list/fields",
    "contacts/list/owners",
    "contacts/new",
    "contacts/{id}/edit",
    "contacts/{id}/delete",
    "contacts/{id}/notes",
    "contacts/{id}/segments",
    "contacts/{id}/campaigns"
]
```

#### Assets

[](#assets)

```
[
    "assets",
    "assets/{id}"
]
```

#### Campaigns

[](#campaigns)

```
[
    "campaigns",
    "campaigns/{id}",
    "campaigns/contact/{id}/add/{leadId}",
    "campaigns/contact/{id}/remove/{leadId}"
]
```

#### Data

[](#data)

```
[
    "data",
    "data/{type}",
]
```

#### Emails

[](#emails)

```
[
    "emails",
    "emails/{id}",
    "emails/{id}/send",
    "emails/{id}/send/lead/{leadId}"
]
```

#### Forms

[](#forms)

```
[
    "forms",
    "forms/{id}"
]
```

#### Pages

[](#pages)

```
[
    "pages",
    "pages/{id}"
]
```

#### Points

[](#points)

```
[
    "points",
    "points/{id}",
    "points/triggers",
    "points/triggers/{id}"
]
```

#### Reports

[](#reports)

```
[
    "reports",
    "reports/{id}"
]
```

#### Segments

[](#segments)

```
[
    "segments",
    "segments/contact/{id}/add/{leadId}",
    "segments/contact/{id}/remove/{leadId}"
]
```

#### Users

[](#users)

```
[
    "roles",
    "roles/{id}",
    "users",
    "users/{id}",
    "users/list/roles",
    "users/self",
    "users/{id}/permissioncheck",
]
```

Please refer to [Documentation](https://developer.mautic.org). for all customizable parameters.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~170 days

Recently: every ~213 days

Total

6

Last Release

2599d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/460a3a95380837ddf119c8f751057c10d1e53d3a1150aa0acfab77bf2e6475ed?d=identicon)[nateritter](/maintainers/nateritter)

---

Top Contributors

[![princealikhan](https://avatars.githubusercontent.com/u/6194551?v=4)](https://github.com/princealikhan "princealikhan (7 commits)")[![backstageel](https://avatars.githubusercontent.com/u/1692858?v=4)](https://github.com/backstageel "backstageel (3 commits)")[![nateritter](https://avatars.githubusercontent.com/u/198798?v=4)](https://github.com/nateritter "nateritter (3 commits)")[![rodrigo-techpump](https://avatars.githubusercontent.com/u/119049741?v=4)](https://github.com/rodrigo-techpump "rodrigo-techpump (1 commits)")

---

Tags

apilaravelautomationemaillumenMauticmarketingsyncprincealikhan

### Embed Badge

![Health badge](/badges/nateritter-laravel-mautic-api/health.svg)

```
[![Health](https://phpackages.com/badges/nateritter-laravel-mautic-api/health.svg)](https://phpackages.com/packages/nateritter-laravel-mautic-api)
```

###  Alternatives

[princealikhan/laravel-mautic-api

Free and Open Source Marketing Automation API

415.9k](/packages/princealikhan-laravel-mautic-api)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)

PHPackages © 2026

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