PHPackages                             dystcz/lunar-api-newsletter - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dystcz/lunar-api-newsletter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dystcz/lunar-api-newsletter
===========================

Add the possibility to sign up to newsletter lists to your Dystore backend

1.0.14(3mo ago)1279MITPHPPHP ^8.2

Since May 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/dystcz/dystore-newsletter)[ Packagist](https://packagist.org/packages/dystcz/lunar-api-newsletter)[ Docs](https://github.com/dystcz/dystore)[ RSS](/packages/dystcz-lunar-api-newsletter/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (34)Used By (0)

Dystore Newsletter
==================

[](#dystore-newsletter)

This [dystore-api](https://github.com/dystcz/dystore-api) compatible package exposes an API endpoint which allows you to subscribe to newsletter lists by providing an email address using the [spatie/laravel-newsletter](https://github.com/spatie/laravel-newsletter) package.

This initial version only takes an email address and subscribes to a list. There may be more endpoints added upon request in the future.

[![Latest Version on Packagist](https://camo.githubusercontent.com/173514fad90b0d92c3cf596a2e86b39ef7af17c812c0ad286a6e969071fb752a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64797374637a2f647973746f72652d6e6577736c65747465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dystcz/dystore-newsletter)[![Total Downloads](https://camo.githubusercontent.com/fe24bafecb2cae3ff2a8a19e24e9ccd71d45402c6d1ec5ba2dadf73fd956221d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64797374637a2f647973746f72652d6e6577736c65747465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dystcz/dystore-newsletter)[![Tests](https://github.com/dystcz/dystore/actions/workflows/tests.yaml/badge.svg)](https://github.com/dystcz/dystore/actions/workflows/tests.yaml)

Important

To open issues or contribute, please navigate to the [main repository](https://github.com/dystcz/dystore). This is a subtree split of [dystore](https://github.com/dystcz/dystore) monorepo.

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

[](#installation)

You can install the package via composer:

```
composer require dystcz/dystore-newsletter
```

To publish the [laravel-newsletter](https://github.com/spatie/laravel-newsletter) config file to `config/newsletter.php` run:

```
php artisan vendor:publish --tag="newsletter-config"
```

The full configuration can be found here: [spatie/laravel-newsletter](https://github.com/spatie/laravel-newsletter/blob/main/config/newsletter.php)

### Using Brevo

[](#using-brevo)

To use Brevo, install this extra package.

```
composer require getbrevo/brevo-php "1.x.x"
```

The `driver` key of the `newsletter` config file must be set to `Dystore\Newsletter\Drivers\BrevoDriver::class`.

Next, you must provide values for the API key and `list.subscribers.id`. You'll find these values in [Brevo settings](https://app.brevo.com/settings/keys/api).

The `endpoint` config value can be set to an empty string.

### Using MailChimp

[](#using-mailchimp)

To use MailChimp, install this extra package.

```
composer require drewm/mailchimp-api
```

The `driver` key of the `newsletter` config file must be set to `Spatie\Newsletter\Drivers\MailChimpDriver::class`.

Next, you must provide values for the API key and `list.subscribers.id`. You'll find these values in the MailChimp UI.

The `endpoint` config value can be set to an empty string.

### Using Ecomail

[](#using-ecomail)

To use Ecomail, install this extra package.

```
composer require ecomailcz/ecomail
```

The `driver` key of the `newsletter` config file must be set to `Dystore\Newsletter\Drivers\EcomailDriver::class`.

Next, you must provide values for the API key and `list.subscribers.id`. You'll find these values in [Ecomail settings](https://app.ecomail.app/settings).

The `endpoint` config value can be set to an empty string.

### Using Mailcoach

[](#using-mailcoach)

To let this package work with Mailcoach, you need to install the Mailcoach SDK.

```
composer require spatie/mailcoach-sdk-php
```

Next, you must provide values for the API key, endpoint and `list.subscribers.id` in the config file. You'll find the API key and endpoint in the [Mailcoach](https://mailcoach.app) settings screen. The value for `list.subscribers.id` must be the UUID of an email list on Mailcoach. You'll find this value on the settings screen of an email list

Usage
-----

[](#usage)

Make a `POST` request here `/api/v1/newsletters/-actions/subscribe` with the following data:

```
$data = [
    'type' => 'newsletters',
    'attributes' => [
        'email' => $email,
    ],
];
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Jakub Theimer](https://github.com/dystcz)
- [Spatie](https://github.com/spatie)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance86

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 73.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 ~41 days

Recently: every ~55 days

Total

26

Last Release

51d ago

Major Versions

0.8.x-dev → 1.0.0-beta.12024-10-14

PHP version history (2 changes)0.3.x-devPHP ^8.1

0.5.x-devPHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/581117abe0f4b50c0ed62f6072f506571a3be5351311f447f10e120c24e2ddca?d=identicon)[theimerj](/maintainers/theimerj)

---

Top Contributors

[![repl6669](https://avatars.githubusercontent.com/u/5587309?v=4)](https://github.com/repl6669 "repl6669 (87 commits)")[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (30 commits)")[![dominik-wbz](https://avatars.githubusercontent.com/u/8103258?v=4)](https://github.com/dominik-wbz "dominik-wbz (1 commits)")

---

Tags

dystorelaravellunarnewsletterlunardystopiadystore

### Embed Badge

![Health badge](/badges/dystcz-lunar-api-newsletter/health.svg)

```
[![Health](https://phpackages.com/badges/dystcz-lunar-api-newsletter/health.svg)](https://phpackages.com/packages/dystcz-lunar-api-newsletter)
```

###  Alternatives

[overtrue/chinese-calendar

中国农历转换与查询工具

557103.7k4](/packages/overtrue-chinese-calendar)[jacobbennett/sendyphp

A PHP Library for interfacing with the Sendy newsletter system (http://sendy.co)

134162.6k1](/packages/jacobbennett-sendyphp)[dystcz/dystore

Collection of ecommerce packages built on top of Lunar and Laravel JSON:API.

121.5k](/packages/dystcz-dystore)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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