PHPackages                             nextmigrant/laravel-sendy - 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. nextmigrant/laravel-sendy

ActiveLibrary

nextmigrant/laravel-sendy
=========================

A generic Sendy email marketing API client for Laravel

v0.0.2(2mo ago)09↓100%MITPHPPHP ^8.2CI passing

Since Mar 6Pushed 2mo agoCompare

[ Source](https://github.com/NextMigrant/laravel-sendy)[ Packagist](https://packagist.org/packages/nextmigrant/laravel-sendy)[ Docs](https://github.com/nextmigrant/laravel-sendy)[ RSS](/packages/nextmigrant-laravel-sendy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Laravel Sendy
=============

[](#laravel-sendy)

A reusable Laravel package that wraps the [Sendy](https://sendy.co) self-hosted email marketing API. It provides a clean `SendyService` class for subscribing/unsubscribing users, managing list membership, querying subscription statuses and active counts, and retrieving brand lists — all with a built-in production environment guard so no real API calls are ever made during development or testing.

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

[](#installation)

```
composer require nextmigrant/laravel-sendy
```

Optionally publish the config file:

```
php artisan vendor:publish --tag=sendy-config
```

This creates `config/sendy.php`. You can also set everything via environment variables:

VariableDescription`SENDY_ENABLED`Enable or disable all API calls (default: `true`). Set to `false` in local/staging.`SENDY_API_KEY`Your Sendy installation API key`SENDY_URL`Base URL of your Sendy installation (e.g. `https://sendy.yourdomain.com`)`SENDY_NEW_USERS_LIST_ID`List ID for the default "new signups" listUsage
-----

[](#usage)

You can use the `Sendy` facade or inject/instantiate `SendyService` directly:

```
use NextMigrant\Sendy\Facades\Sendy;

// Via facade
$response = Sendy::subscribe('john@example.com', 'list-abc', 'John', 'Doe');
```

```
use NextMigrant\Sendy\SendyService;

// Via direct instantiation
$sendy = new SendyService;
$response = $sendy->subscribe('john@example.com', 'list-abc', 'John', 'Doe');

// Or via dependency injection (registered as a singleton)
public function __construct(private SendyService $sendy) {}
```

> **Note:** All methods are guarded by the `sendy.enabled` config value. When set to `false` (via `SENDY_ENABLED=false` in your `.env`), methods return `null` (or `[]` for `getLists`) without making any API calls.

### Subscribe

[](#subscribe)

```
$response = $sendy->subscribe(
    email: 'john@example.com',
    listId: 'your-list-id',
    firstName: 'John',
    lastName: 'Doe',
);

// With optional full name and custom fields
$response = $sendy->subscribe(
    email: 'john@example.com',
    listId: 'your-list-id',
    firstName: 'John',
    lastName: 'Doe',
    fullName: 'Dr. John Doe',
    options: [
        'country' => 'CA',
        'gdpr' => 'true',
        'Birthday' => '1990-01-15',
    ],
);
```

### Unsubscribe

[](#unsubscribe)

```
$response = $sendy->unsubscribe('john@example.com', 'your-list-id');
```

### Delete Subscriber

[](#delete-subscriber)

```
$response = $sendy->deleteSubscriber('john@example.com', 'your-list-id');
```

### Get Subscription Status

[](#get-subscription-status)

```
$response = $sendy->getSubscriptionStatus('john@example.com', 'your-list-id');

// $response->message will be one of:
// Subscribed, Unsubscribed, Unconfirmed, Bounced, Soft bounced, Complained
```

### Get Active Subscriber Count

[](#get-active-subscriber-count)

```
$response = $sendy->getActiveSubscriberCount('your-list-id');

// $response->message contains the count as a string (e.g. "1523")
```

### Get Lists

[](#get-lists)

```
$lists = $sendy->getLists(brandId: 1);
// Returns: [['id' => 1, 'name' => 'Newsletter'], ...]

// Include hidden lists
$lists = $sendy->getLists(brandId: 1, includeHidden: true);
```

Response Object
---------------

[](#response-object)

All methods (except `getLists`) return a `SendyResponse` DTO:

```
use NextMigrant\Sendy\SendyResponse;

$response->success; // bool
$response->message; // string — "1" on success, or an error message
```

The static factory `SendyResponse::fromApiResponse(string $body)` treats `"1"` and `"true"` (case-insensitive) as success.

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance87

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

Every ~0 days

Total

2

Last Release

66d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4005def0f22ee9575e621ecea797e56ec154d4506a7fe8633f7f8c34f6c8de27?d=identicon)[nextmigrant](/maintainers/nextmigrant)

---

Top Contributors

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

---

Tags

laravelemail marketingSendynextmigrant

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nextmigrant-laravel-sendy/health.svg)

```
[![Health](https://phpackages.com/badges/nextmigrant-laravel-sendy/health.svg)](https://phpackages.com/packages/nextmigrant-laravel-sendy)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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