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

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

masmaleki/laravel-mautic-api
============================

Free and Open Source Marketing Automation API for laravel 8

v1.1.10(1y ago)02842MITPHPPHP ^7.3|^8.2

Since Jun 23Pushed 1y agoCompare

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

READMEChangelog (9)Dependencies (4)Versions (15)Used By (0)

Mautic API in Laravel 8.
------------------------

[](#mautic-api-in-laravel-8)

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 masmaleki/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' => [
	// ...
	'masmaleki\Mautic\MauticServiceProvider',
],
```

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

```
'aliases' => [
    //.....
    'Mautic' => 'masmaleki\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' => 'Edison',
    'lastname'=> 'Costa',
    'email' => 'edison@keepcloud.io'
);

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

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

39

—

LowBetter than 86% of packages

Maintenance45

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~132 days

Recently: every ~240 days

Total

14

Last Release

424d ago

PHP version history (4 changes)1.0.0PHP &gt;=7.2.5

1.0.2PHP &gt;7.2.5

1.1.4PHP ^7.3|^8.0

1.1.7PHP ^7.3|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/700c615243c927236af92c6ce4f857b0047639518570866f96b0ec9adca1a773?d=identicon)[masmaleki](/maintainers/masmaleki)

---

Top Contributors

[![masmaleki](https://avatars.githubusercontent.com/u/5430351?v=4)](https://github.com/masmaleki "masmaleki (14 commits)")[![AliMehraei](https://avatars.githubusercontent.com/u/72335154?v=4)](https://github.com/AliMehraei "AliMehraei (1 commits)")[![shahriared](https://avatars.githubusercontent.com/u/57944847?v=4)](https://github.com/shahriared "shahriared (1 commits)")

---

Tags

laravellaravel-frameworklaravel-packagelaravel8marketingmauticapilaravelautomationemaillumenMauticmarketingsyncmasmaleki

### Embed Badge

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

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

###  Alternatives

[princealikhan/laravel-mautic-api

Free and Open Source Marketing Automation API

415.9k](/packages/princealikhan-laravel-mautic-api)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[hafael/azure-mailer-driver

Supercharge your Laravel or Symfony app with Microsoft Azure Communication Services (ACS)! Effortlessly add email, chat, voice, video, and telephony-over-IP for next-level communication. 🚀

14109.2k](/packages/hafael-azure-mailer-driver)

PHPackages © 2026

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