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

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

notific/notific-php-sdk
=======================

An SDK to easily work with the Notific API

v1.0-beta.4(7y ago)56082MITPHPPHP ^7.0CI failing

Since Mar 27Pushed 6y ago2 watchersCompare

[ Source](https://github.com/notific/notific-php-sdk)[ Packagist](https://packagist.org/packages/notific/notific-php-sdk)[ Docs](https://github.com/notific/notific-php-sdk)[ RSS](/packages/notific-notific-php-sdk/feed)WikiDiscussions master Synced 2mo ago

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

[![Notific.io](notific-logo.png)](notific-logo.png)

An SDK to easily work with the Notific API
==========================================

[](#an-sdk-to-easily-work-with-the-notific-api)

This SDK lets you perform API calls to [Notific](https://notific.io). API documentation

Usage
-----

[](#usage)

To install the SDK in your project you need to require the package via composer:

`$ composer require notific/notific-php-sdk`

Create an instance of the SDK:

```
$notific = new Notific\PhpSdk\Notific(APP_ID, API_TOKEN);
```

If you don't have an App ID yet, sign up at

Public notifications
--------------------

[](#public-notifications)

You can get an array of public notification instances with `publicNotifications()` method.

```
$notific->publicNotifications();
```

You can optionally give arguments to method which will be transformed to query parameters. Read more about filtering and sorting options from [API documentation](https://notific.io/api/#list-public-notifications)

```
$notific->publicNotifications([
    'page' => 2,
    'limit' => 25,
    'sort' => '-created_at'
]);
```

Create new public notification.

```
$notific->createPublicNotification([
    'title' => 'Welcome!'
    'body'  => 'This is the body of the notification...'
]);
```

Retrieve a public notification instance.

```
$notification = $notific->publicNotification($id);
```

Update the notification.

```
$notification->update([
  'title' => 'Boom!'
  'body'  => 'This is the updated body of the notification.'
]);
```

Delete the notification.

```
$notification->delete();
```

Recipients
----------

[](#recipients)

You can get an array of recipient instances with `recipients()` method.

```
$notific->recipients();
```

You can optionally give arguments to method which will be transformed to query parameters. Read more about filtering and sorting options from [API documentation](https://notific.io/api/#list-recipients)

Create a recipient.

```
$notific->createRecipient([
    'id'    => '123', // Unique identifier for the user. You can use integers, hashes or what ever suites you best.
    'name'  => 'Kung Fury',
    'email' => 'kung.fury@email.com'
    'phone' => '+358 40 123 456' // You can add meta information to recipient as key => value pairs.
]);
```

Retrieve a recipient instance.

```
$recipient = $notific->recipient($id);
```

Update the recipient.

```
$recipient = $recipient->update([
    'name'  => 'Fury'
]);
```

Add tags to the recipient.

```
$recipient = $recipient->tag([
    'Foo', 'Bar', 'Baz'
]);
```

Remove tags from the recipient.

```
$recipient = $recipient->removeTags([
    'Bar'
]);
```

Remove all tags from the recipient.

```
$recipient = $recipient->removeAllTags();
```

Templates
---------

[](#templates)

Where private notifications are immutable and unnamed, templates are editable and easy to retrieve by name.

You can get an array of template instances with `templates()` method.

```
$notific->templates();
```

Create a template.

```
$notific->createTemplate([
    'title' => 'Lorem ipsum dolor sit amet.',
    'body'  => 'Lorem ipsum dolor sit amet, consectetur adipiscing...',
    'name' => 'lorem-ipsum'
]);
```

Retrieve a template with a name parameter.

```
$template = $notific->template($name);
```

Private notifications
---------------------

[](#private-notifications)

You can get an array of private notification instances with `privateNotifications()` method.

```
$notific->privateNotifications();
```

You can optionally give arguments to method which will be transformed to query parameters. Read more about filtering and sorting options from [API documentation](https://notific.io/api/#list-private-notifications)

```
$notific->privateNotifications([
    'filter[type]' => '1,2',
    'sort' => '-created_at'
]);
```

Create new private notification.

```
$notific->createPrivateNotification([
    'title' => 'Welcome!'
    'body'  => 'This is the body of the private notification...'
]);
```

Retrieve a private notification instance.

```
$notification = $notific->privateNotification($id);
```

Update the private notification.

```
$notification->update([
  'title' => 'Boom!'
  'body'  => 'This is the updated body of the private notification.'
]);
```

Send private notifications
--------------------------

[](#send-private-notifications)

You can use a private notification or a template to send a private notifications to recipient(s). We recommend you to use templates because they are easier to refer and manage as they are editable.

Send private notification with the notification id and recipient(s) id:s. Recipients can be a string, a list or an an array of id:s.

```
$data = $notific->template($name)->recipients($recipients)->send()
```

```
$data = $notific->privateNotification($notificationId)->recipients($recipients)->send()
```

You can use two delivery channels to send private notifications, broadcast (default) and email. Email channel requires valid email settings.

```
$data = $notific->template($name)->recipients($recipients)->channels('broadcast', 'email')->send()
```

```
$data = $notific->privateNotification($notificationId)->recipients($recipients)->channels('broadcast')->send()
```

If you are tagging your recipients you can send notification using tags. Tags can be a string, a list or an array of id:s. Recipient must have all given tags.

```
$data = $notific->template($name)->tags($tags)->send()
```

```
$data = $notific->privateNotification($notificationId)->tags($tags)->send()
```

To send a notification to ALL your recipients, use predefined tag *all*.

```
$data = $notific->template($name)->tags('all')->send()
```

```
$data = $notific->privateNotification($notificationId)->tags('all')->send()
```

Alternative way to send private notification with private notification instance.

```
$data = $notific->template($id)->sendTo($recipients);
```

```
$data = $notific->privateNotification($notificationId)->sendTo($recipients);
```

Send private notification with recipient instance.

```
$data = $notific->recipient($id)->sendNotification($notificationId);
```

Tip: you can test the private notification and send it to your self. You will receive the notification instantly if you are logged in to [notific.io dashboard](https://app.notific.io/dashboard).

```
$data = $notific->template($name)->test();
```

```
$data = $notific->privateNotification($id)->test();
```

Pagination &amp; limiting
-------------------------

[](#pagination--limiting)

Response data will be paginated to 15 items by default. Navigating through the pages and limiting the number of items per page can be done with query parameters. For example `?page=2&limit=25`. Read more about paging and limiting from [API documentation](https://notific.io/api/#response-pagination).

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Kalle Palokankare](https://github.com/palokankare)

This package uses code from and is greatly inspired by the [Oh Dear SDK package](https://github.com/ohdearapp/ohdear-php-sdk) which is inspired by the [Forge SDK package](https://github.com/themsaid/forge-sdk) by [Mohammed Said](https://github.com/themsaid).

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.9% 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 ~135 days

Total

4

Last Release

2560d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e97250f77e703b9f72b8d3f5c3dde7c0ad56323a462fadad27937d63bf21945?d=identicon)[palokankare](/maintainers/palokankare)

---

Top Contributors

[![palokankare](https://avatars.githubusercontent.com/u/277939?v=4)](https://github.com/palokankare "palokankare (47 commits)")[![tunnela](https://avatars.githubusercontent.com/u/5994856?v=4)](https://github.com/tunnela "tunnela (1 commits)")

---

Tags

apinotificationsphpprivate-notificationssdkphpapisdknotificationnotificationsnotific

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[bentools/webpush-bundle

Send push notifications through Web Push Protocol to your Symfony users.

71274.3k](/packages/bentools-webpush-bundle)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[joetannenbaum/phpushbullet

PHP API wrapper for Pushbullet.

3146.4k4](/packages/joetannenbaum-phpushbullet)[tomatophp/filament-accounts

Manage your multi accounts inside your app using 1 table with multi auth and a lot of integrations

748.3k7](/packages/tomatophp-filament-accounts)[novu/novu-laravel

Novu for Laravel

12204.3k](/packages/novu-novu-laravel)

PHPackages © 2026

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