PHPackages                             denis-guselnikov/unigo-php - 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. denis-guselnikov/unigo-php

ActiveLibrary[API Development](/categories/api)

denis-guselnikov/unigo-php
==========================

The UniGo SDK package what provide methods to interact with Unisender Go API.

1.0.1(11mo ago)13.5k↓18.4%MITPHPPHP ^7.4 || ^8.0

Since Jun 8Pushed 11mo agoCompare

[ Source](https://github.com/Denis-Guselnikov/unigo-php)[ Packagist](https://packagist.org/packages/denis-guselnikov/unigo-php)[ RSS](/packages/denis-guselnikov-unigo-php/feed)WikiDiscussions master Synced 1mo ago

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

UniGo PHP client
================

[](#unigo-php-client)

[![Latest Stable Version](https://camo.githubusercontent.com/a986d06c4336969a40368f2b3fb3a2fcd798eb338061c3c4a2c6267d82f10c9c/687474703a2f2f706f7365722e707567782e6f72672f756e6973656e6465722f756e69676f2d7068702f76)](https://packagist.org/packages/unisender/unigo-php)[![Total Downloads](https://camo.githubusercontent.com/1bce44786e75435cc34d85cc840a3fa07fde53b57f327b04df6e711155a5b8aa/687474703a2f2f706f7365722e707567782e6f72672f756e6973656e6465722f756e69676f2d7068702f646f776e6c6f616473)](https://packagist.org/packages/unisender/unigo-php)

> ⚠️ This is a **fork** of the official SDK Unisender Go:
> Original:
> License: MIT

This SDK contains methods for easily interacting with the Unisender Go API:

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

[](#installation)

Use Composer to install the package:

```
composer require denis-guselnikov/unigo-php
```

Usage
-----

[](#usage)

### Send email:

[](#send-email)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');
  // Example for GO1 server.
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'go1.unisender.ru');

  $recipients = [
    [
      "email" => 'john@example.com',
      "substitutions" => [
        "to_name" => "John Smith"
      ],
    ],
    [
      "email" => 'liza@example.com',
      "substitutions" => [
        "to_name" => "Liza Frank"
      ],
    ]
  ];

  $body = [
    "html" => "Test mail, {{to_name}}",
    "plaintext" => "Hello, {{to_name}}",
    "amp" => "  body[visibility:hidden] Hello, AMP4EMAIL world."
  ];

  // You can use email object can be used to prepare the message array.
  // But the email send method accepts an array, that can be composed without
  // SDK utils.
  $mail = new Unisender\Model\Email($recipients, $body);
  $mail->setFromEmail('user@example.com');
  $mail->setSubject('test letter');
  $response = $client->emails()->send($mail->toArray());
```

See [API documentation](https://godocs.unisender.ru/web-api-ref#email) for more details.

See [template engine documentation](https://godocs.unisender.ru/simple-template-engine) for substitutions details.

### Send subscribe email:

[](#send-subscribe-email)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');

  $params = [
    "from_email" => "john@example.com",
    "from_name" => "John Smith",
    "to_email" => "user@example.com"
  ];
  $response = $client->emails()->subscribe($params);
```

API [documentation](https://godocs.unisender.ru/web-api-ref#email-subscribe).

### Set template:

[](#set-template)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');

  $params = [
    "template" => [
      "name" => "First template",
      "body" => [
        "html" => "Hello, {{to_name}}",
        "plaintext" => "Hello, {{to_name}}",
        "amp" => "  body[visibility:hidden] Hello, AMP4EMAIL world."
      ],
      "subject" => "Test template mail",
      "from_email" => "test@example.com",
      "from_name" => "Example From",
    ]
  ];
  $response = $client->templates()->set($params);
```

API [documentation](https://godocs.unisender.ru/web-api-ref#template).

### Get template:

[](#get-template)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');
  $response = $client->templates()->get('YOUR-TEMPLATE-ID');
```

API [documentation](https://godocs.unisender.ru/web-api-ref#template-get).

### Get templates list:

[](#get-templates-list)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');

  $params = [
    "limit" => 50,
    "offset" => 0
  ];
  $response = $client->templates()->list($params);
```

API [documentation](https://godocs.unisender.ru/web-api-ref#template-list).

### Delete template:

[](#delete-template)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');
  $response = $client->templates()->delete('YOUR-TEMPLATE-ID');
```

API [documentation](https://godocs.unisender.ru/web-api-ref#template-delete).

### Set webhook:

[](#set-webhook)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');

  $params = [
    "url" => "https://yourhost.example.com/unigo-webhook",
    "events" => [
      "email_status" => [
        "delivered",
        "opened",
        "clicked",
        "unsubscribed",
        "soft_bounced",
        "hard_bounced",
        "spam"
      ]
    ]
  ];
  $response = $client->webhooks()->set($params);
```

API [documentation](https://godocs.unisender.ru/web-api-ref#webhook-set).

The specified URL will receive a request from Unisender Go. See more information about request data in API [documentation](https://godocs.unisender.ru/web-api-ref#callback-format).

This is how you can check the message integrity in your callback handler:

```
$client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');
// $body contains a callback request body.
if ($client->webhooks()->verify($body) === TRUE) {
  // The webhook is confirmed, result can be processed.
}
```

### Get webhook:

[](#get-webhook)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');
  $response = $client->webhooks()->get('YOUR-WEBHOOK-URL');
```

API [documentation](https://godocs.unisender.ru/web-api-ref#webhook-get).

### Get list all or some webhooks:

[](#get-list-all-or-some-webhooks)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');
  $response = $client->webhooks()->list();
```

API [documentation](https://godocs.unisender.ru/web-api-ref#webhook-list).

### Delete webhook:

[](#delete-webhook)

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');
  $response = $client->webhooks()->delete('YOUR-WEBHOOK-URL');
```

API [documentation](https://godocs.unisender.ru/web-api-ref#webhook-delete).

Additional information
----------------------

[](#additional-information)

### Generic API method

[](#generic-api-method)

For API methods, that are not implemented in SDK yet, you can use `UniGoClient::httpRequest()`. Here is an example for "set" suppression method:

```
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME');
  $response = $client->httpRequest('suppression/set.json', ["email" => "user@example.com", "cause" => "unsubscribed"]);
```

### Set Guzzle HTTP client config

[](#set-guzzle-http-client-config)

Unisender Go client accepts an array with Guzzle configuration as a third argument. When creating a client, you can pass some additional options (i.e. connect\_timeout) to apply this to all requests.

Here is a more advanced example of adding a history handler to save outcoming requests and responses.

```
  $container = [];
  $history = Middleware::history($container);
  $handlerStack = HandlerStack::create();
  $handlerStack->push($history);
  $config = ['handler' => $handlerStack];
  $client = new Unisender\UniGoClient('YOUR-API-KEY', 'YOUR-HOST-NAME', $config);
```

See [Guzzle documentation](https://docs.guzzlephp.org/en/stable/request-options.html).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance51

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

344d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e9e0272c14528cb99802d0515aefd6924980ff7cc7ca03686a7a01cd5317fd7?d=identicon)[Denis-Guselnikov](/maintainers/Denis-Guselnikov)

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/denis-guselnikov-unigo-php/health.svg)

```
[![Health](https://phpackages.com/badges/denis-guselnikov-unigo-php/health.svg)](https://phpackages.com/packages/denis-guselnikov-unigo-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)[linkstreet/box-sdk

v2 Box sdk for php

121.3k](/packages/linkstreet-box-sdk)

PHPackages © 2026

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