PHPackages                             sendivent/sdk - 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. sendivent/sdk

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

sendivent/sdk
=============

Official PHP SDK for Sendivent - Multi-channel notification platform

0.4.0(1mo ago)0168↓50%MITPHPPHP &gt;=8.1

Since Nov 16Pushed 1mo agoCompare

[ Source](https://github.com/appitudeio/sendivent-php)[ Packagist](https://packagist.org/packages/sendivent/sdk)[ RSS](/packages/sendivent-sdk/feed)WikiDiscussions development Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (11)Used By (0)

Sendivent PHP SDK
=================

[](#sendivent-php-sdk)

[![Latest Version](https://camo.githubusercontent.com/b306f9293ff7d35c7a8104e396ccdb25bbe0c461d475c225e16634b15f923475/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73656e646976656e742f73646b2e737667)](https://packagist.org/packages/sendivent/sdk)[![License](https://camo.githubusercontent.com/d9bd8c51c38488bd0ab0aacd9556151e1a8b24b2c29274689bd8cce5f1e33496/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73656e646976656e742f73646b2e737667)](https://packagist.org/packages/sendivent/sdk)

Official PHP SDK for [Sendivent](https://sendivent.com) - Multi-channel notification platform supporting Email, SMS, Slack, and Push notifications.

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

[](#installation)

```
composer require sendivent/sdk
```

Requires PHP 8.1+ and Guzzle 7.0+

Quick Start
-----------

[](#quick-start)

```
use Sendivent\Sendivent;

$sendivent = new Sendivent('test_your_api_key_here');

$sendivent
    ->event('welcome')
    ->to('user@example.com')
    ->payload(['name' => 'John Doe'])
    ->send();
```

The SDK automatically routes to sandbox (`test_*`) or production (`live_*`) based on your API key prefix.

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

[](#response-object)

The `send()` method returns a `SendResponse` object with helper methods:

```
$response = $sendivent
    ->event('invoice')
    ->to('user@example.com')
    ->payload(['amount' => 100])
    ->send();

if ($response->isSuccess()) {
    echo "Sent! Queue IDs: " . json_encode($response->data);
} else {
    echo "Error: " . $response->error;
}

// Available properties: success, data, error, message
// Available methods: isSuccess(), hasError(), toArray(), toJson()
```

Fire-and-Forget
---------------

[](#fire-and-forget)

For background sending without waiting for the response:

```
$promise = $sendivent
    ->event('notification')
    ->to('user@example.com')
    ->payload(['message' => 'Hello'])
    ->sendAsync();

// Continue with other work...
// Promise resolves in background
```

Contact Objects &amp; Smart Detection
-------------------------------------

[](#contact-objects--smart-detection)

The `to()` method accepts strings, Contact objects, or arrays of either. Sendivent automatically detects what type of identifier you're sending:

```
// String inputs - automatically detected by pattern matching
$sendivent->event('welcome')->to('user@example.com')->send();  // Detected as email
$sendivent->event('sms-code')->to('+1234567890')->send();      // Detected as phone
$sendivent->event('alert')->to('U12345')->send();              // Detected as Slack user ID

// Contact objects - your user's ID maps to external_id in Sendivent
$sendivent
    ->event('welcome')
    ->to([
        'id' => 'user-12345',           // Your user's ID
        'email' => 'user@example.com',
        'phone' => '+1234567890',
        'name' => 'John Doe',
        'avatar' => 'https://example.com/avatar.jpg',
        'meta' => ['tier' => 'premium']
    ])
    ->payload(['welcome_message' => 'Hello!'])
    ->send();

// Multiple recipients
$sendivent
    ->event('newsletter')
    ->to([
        'user1@example.com',
        ['id' => 'user-456', 'email' => 'user2@example.com', 'name' => 'Jane']
    ])
    ->payload(['subject' => 'Monthly Update'])
    ->send();

// Broadcast to Slack channel (no contact created)
$sendivent
    ->event('system-alert')
    ->channel('slack')
    ->to('#general')  // Broadcasts to channel, doesn't create contact
    ->payload(['message' => 'System update'])
    ->send();
```

Key Features
------------

[](#key-features)

- **Multi-channel** - Email, SMS, Slack, and Push in one API
- **Fluent API** - Clean, chainable method calls
- **Type-safe** - Full PHP 8.1+ type hints
- **Fire-and-forget** - Async sending with `sendAsync()`
- **Idempotency** - Prevent duplicate sends with `idempotencyKey()`
- **Template overrides** - Customize subject, sender, etc. per request
- **Language support** - Send in different languages with `language()`
- **Channel control** - Force specific channels with `channel()`
- **Broadcast mode** - Send to event listeners without specifying recipients

Additional Examples
-------------------

[](#additional-examples)

### Channel-Specific Sending

[](#channel-specific-sending)

```
$sendivent
    ->event('verification-code')
    ->channel('sms')
    ->to('+1234567890')
    ->payload(['code' => '123456'])
    ->send();
```

### Template Overrides

[](#template-overrides)

```
$sendivent
    ->event('invoice')
    ->to('user@example.com')
    ->payload(['amount' => 100])
    ->overrides([
        'email' => [
            'subject' => 'Custom Subject',
            'reply_to' => 'billing@company.com'
        ]
    ])
    ->send();
```

### Brand Overrides

[](#brand-overrides)

```
$sendivent
    ->event('welcome')
    ->to('user@example.com')
    ->overrides([
        'brand' => ['logotype' => 'https://example.fi/logo.png']
    ])
    ->send();
```

### Idempotency

[](#idempotency)

```
$sendivent
    ->event('order-confirmation')
    ->to('user@example.com')
    ->payload(['order_id' => '12345'])
    ->idempotencyKey('order-12345-confirmation')
    ->send();
```

### Language Selection

[](#language-selection)

```
$sendivent
    ->event('welcome')
    ->to('user@example.com')
    ->payload(['name' => 'Anders'])
    ->language('sv')  // Swedish
    ->send();
```

### Broadcast Events

[](#broadcast-events)

Send to configured event listeners without specifying recipients:

```
$sendivent
    ->event('system-alert')
    ->payload(['severity' => 'high', 'message' => 'System alert'])
    ->send();
```

Full Example
------------

[](#full-example)

See [example.php](./example.php) for a comprehensive demonstration of all SDK features.

Support
-------

[](#support)

- **Documentation:** [docs.sendivent.com](https://docs.sendivent.com)
- **Issues:** [github.com/sendivent/sdk-php/issues](https://github.com/sendivent/sdk-php/issues)

License
-------

[](#license)

MIT License - see [LICENSE](./LICENSE) file for details.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance89

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

Every ~32 days

Total

5

Last Release

55d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9c15bcc162cc07194eed7597e4bd984476128c39b5b54959fcf9dc139e96d23?d=identicon)[oakleaf](/maintainers/oakleaf)

---

Top Contributors

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

---

Tags

emailnotificationsslacksmssendivent

### Embed Badge

![Health badge](/badges/sendivent-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/sendivent-sdk/health.svg)](https://phpackages.com/packages/sendivent-sdk)
```

###  Alternatives

[tuyakhov/yii2-notifications

The extension provides support for sending notifications across a variety of delivery channels, including mail, SMS, Slack etc. Notifications may also be stored in a database so they may be displayed in your web interface.

6735.5k2](/packages/tuyakhov-yii2-notifications)[beyondcode/slack-notification-channel

Slack Notification Channel for Laravel using API tokens.

85525.8k](/packages/beyondcode-slack-notification-channel)[craftpulse/craft-notifications

Send notifications across a variety of delivery channels, including mail and Slack. Notifications may also be stored in a database so they may be displayed in your web interface.

551.2k](/packages/craftpulse-craft-notifications)[ferdous/laravel-otp-validate

Laravel package for OTP validation with built-in features like retry and resend mechanism. Built in max retry and max resend blocking. OTP/Security Code can be send over SMS or Email of your choice with user-defined template.

7124.4k](/packages/ferdous-laravel-otp-validate)

PHPackages © 2026

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