PHPackages                             gentor/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. gentor/laravel-mautic-api

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

gentor/laravel-mautic-api
=========================

Free and Open Source Marketing Automation API

v1.0.2(9y ago)017MITPHPPHP &gt;=5.5.9

Since Nov 27Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (4)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 gentor/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` for OAuth2 or `username` and `password` for BasicAuth in `mautic.php` file that is found in your applications `config` directory.

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

[](#authorization)

This Library only supports OAuth2 and Basic Authorization. For OAuth2 you need to create a OAuth2 client in order to use the 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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~8 days

Total

3

Last Release

3435d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/210fd495e96c05caab1d50c09165794ff73175a9b49c43f91df0c8524dfa8add?d=identicon)[gentor](/maintainers/gentor)

---

Top Contributors

[![gentor](https://avatars.githubusercontent.com/u/2902504?v=4)](https://github.com/gentor "gentor (2 commits)")[![princealikhan](https://avatars.githubusercontent.com/u/6194551?v=4)](https://github.com/princealikhan "princealikhan (1 commits)")

---

Tags

apilaravelautomationemaillumenMauticmarketingsyncprincealikhan

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/gentor-laravel-mautic-api/health.svg)](https://phpackages.com/packages/gentor-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)
