PHPackages                             kevinpurwito/laravel-mailcoach-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. [API Development](/categories/api)
4. /
5. kevinpurwito/laravel-mailcoach-api

ActiveLibrary[API Development](/categories/api)

kevinpurwito/laravel-mailcoach-api
==================================

Mailcoach API integration for Laravel

v1.0.0(3y ago)01.8kMITPHPPHP ^8.1

Since Oct 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kevinpurwito/laravel-mailcoach-api)[ Packagist](https://packagist.org/packages/kevinpurwito/laravel-mailcoach-api)[ Docs](https://github.com/kevinpurwito/laravel-mailcoach-api)[ Fund](https://www.paypal.me/kevinpurwito)[ GitHub Sponsors](https://github.com/kevinpurwito)[ RSS](/packages/kevinpurwito-laravel-mailcoach-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

About Laravel Mailcoach API
===========================

[](#about-laravel-mailcoach-api)

[![Tests](https://github.com/kevinpurwito/laravel-mailcoach-api/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/kevinpurwito/laravel-mailcoach-api/actions/workflows/run-tests.yml)[![Code Style](https://github.com/kevinpurwito/laravel-mailcoach-api/actions/workflows/php-cs-fixer.yml/badge.svg?branch=main)](https://github.com/kevinpurwito/laravel-mailcoach-api/actions/workflows/php-cs-fixer.yml)[![Psalm](https://github.com/kevinpurwito/laravel-mailcoach-api/actions/workflows/psalm.yml/badge.svg?branch=main)](https://github.com/kevinpurwito/laravel-mailcoach-api/actions/workflows/psalm.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/da19654081bf729a7da6f70b477679656abb0c9bbea74d8da3be0508dbd0ad27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6576696e7075727769746f2f6c61726176656c2d6d61696c636f6163682d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kevinpurwito/laravel-mailcoach-api)[![Total Downloads](https://camo.githubusercontent.com/410358590b5a9f387a8637cdd679ef613bd19eaffac00bcd3ab3f4b59befb795/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6576696e7075727769746f2f6c61726176656c2d6d61696c636f6163682d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kevinpurwito/laravel-mailcoach-api)

Laravel Mailcoach API is a package to make it easier to integrate your own [Mailcoach API](https://mailcoach.app/) for your other Laravel projects.

Refer to this [docs](https://mailcoach.app/docs/self-hosted/v5/using-the-api/subscribers)

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

[](#installation)

You can install the package via composer:

```
composer require kevinpurwito/laravel-mailcoach-api
```

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

[](#configuration)

The `vendor:publish` command will publish a file named `kp_mailcoach.php` within your laravel project config folder `config/kp_mailcoach.php`.

Published Config File Contents

```
[
    'url' => strtolower(env('KP_MAILCOACH_API_URL')),

    'token' => env('KP_MAILCOACH_API_TOKEN'),

    'list_id' => intval(env('KP_MAILCOACH_LIST_ID', 1)),
];
```

Alternatively you can ignore the above publish command and add this following variables to your `.env` file.

```
KP_MAILCOACH_API_URL=your_mailcoach_api_url
KP_MAILCOACH_API_TOKEN=your_mailcoach_api_token

```

Auto Discovery
--------------

[](#auto-discovery)

If you're using Laravel 5.5+ you don't need to manually add the service provider or facade. This will be Auto-Discovered. For all versions of Laravel below 5.5, you must manually add the ServiceProvider &amp; Facade to the appropriate arrays within your Laravel project `config/app.php`

### Provider

[](#provider)

```
[
    Kevinpurwito\LaravelMailcoachApi\MailcoachApiServiceProvider::class,
];
```

### Alias / Facade

[](#alias--facade)

```
[
    'MailcoachApi' => Kevinpurwito\LaravelMailcoachApi\Facades\MailcoachApi::class,
];
```

Usage
-----

[](#usage)

### Using Facade

[](#using-facade)

```
use Kevinpurwito\LaravelMailcoachApi\Facades\MailcoachApi;

MailcoachApi::getSubscribers();
```

### Using Class

[](#using-class)

```
use Kevinpurwito\LaravelMailcoachApi\MailcoachApi;
use Kevinpurwito\LaravelMailcoachApi\Data\InputSubscriberData;

$mcApi = (new MailcoachApi(url: '', token: ''));

$data = new InputSubscriberData(email: '', first_name: '', last_name: '');

$subscriber = $mcApi->addSubscriber(listId: 0, data: $data);
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kevin Purwito](https://github.com/kevinpurwito)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com)by [Beyond Code](http://beyondco.de/)with some modifications inspired from [PHP Package Skeleton](https://github.com/spatie/package-skeleton-php)by [spatie](https://spatie.be/).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1309d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47e3d5e05f33c7b66c0c646fbce5dac5a319a8fd7ebb13977d2a1ae3df91e9a4?d=identicon)[kevinpurwito](/maintainers/kevinpurwito)

---

Top Contributors

[![kevinpurwito](https://avatars.githubusercontent.com/u/11625012?v=4)](https://github.com/kevinpurwito "kevinpurwito (13 commits)")

---

Tags

laravelmailcoachphpapilaravelmailcoachkevinpurwito

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kevinpurwito-laravel-mailcoach-api/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)[bushlanov-dev/max-bot-api-client-php

Max Bot API Client library

281.6k](/packages/bushlanov-dev-max-bot-api-client-php)

PHPackages © 2026

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