PHPackages                             getsno/relesys-users - 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. getsno/relesys-users

ActiveLibrary[API Development](/categories/api)

getsno/relesys-users
====================

Relesys User Management API client for Laravel

v4.0.0(1mo ago)05.9k↓29.5%MITPHPPHP ^8.3

Since Apr 17Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/getsno/relesys-users)[ Packagist](https://packagist.org/packages/getsno/relesys-users)[ Docs](https://github.com/getsno/relesys-users)[ RSS](/packages/getsno-relesys-users/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (8)Versions (14)Used By (0)

Relesys User Management API client for Laravel
==============================================

[](#relesys-user-management-api-client-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d0bb8c5fa37a2824eedc3c5c2dea2d17df9a81416cd51d377486fa7b76ef359b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676574736e6f2f72656c657379732d75736572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/getsno/relesys-users)[![Total Downloads](https://camo.githubusercontent.com/cb09cef738a6128d633aa7f0ab24c071837c45952db9abed1bbead6d51f7c741/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676574736e6f2f72656c657379732d75736572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/getsno/relesys-users)[![Made in Ukraine](https://camo.githubusercontent.com/43115c9fb377039d5dac27be07e5f0e21ea561f4fa1e66ed1aa39e723784ede0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6164655f696e2d756b7261696e652d6666643730302e7376673f6c6162656c436f6c6f723d303035376237)](https://stand-with-ukraine.pp.ua)

This Laravel package provides a simple and crisp way to access the [Relesys](https://api.relesysapp.net/docs/v1.1/intro) User Management API endpoints, query data and update existing entries.

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

[](#installation)

This version requires PHP ^8.1 and supports Laravel 10.

1. Install the package via composer:

    ```
    composer require getsno/relesys-api
    ```
2. Get your Relesys API access credentials like explained in their [documentation](https://api.relesysapp.net/docs/v1.1/intro/access)*(to work with User Management API you must have access to `relesys.api.users` scope)*.
3. Add to your .env file:

    ```
     RELESYS_CLIENT_ID=""
     RELESYS_CLIENT_SECRET=""
    ```

Usage
-----

[](#usage)

The package supports all the endpoints from "User Management" documentation section *(including sorting, filtering and pagination)*.

The package interface is very similar to documentation sections (`customFields`, `departments`, `userGroups`, `users`, `communication`), method names are the same as endpoint names.

#### Examples

[](#examples)

```
use \Relesys;
use \Getsno\Relesys\Api\UserManagement\Entities\User;
use \Getsno\Relesys\Api\UserManagement\Enums\UserStatus;
use \Getsno\Relesys\Api\ApiQueryParams;
use \Getsno\Relesys\Api\UserManagement\Entities\Patches\UserPatch;

// create user
$user = User::fromArray([
    'name'                => 'Anton',
    'primaryDepartmentId' => '0956339c-f3db-4a58-b6b3-d04a56dc85f6',
    'phoneNumber'         => [
        'countryCode' => 47,
        'number'      => '777777',
    ],
    'userGroups'          => [
        [
            'id': 'bfab8670-b3a4-4a6b-bc3a-1d1c7c13a636',
            'dataSource': 'RelesysAPI',
        ],
        [
            'id': 'a213e04f-0860-4449-80a3-5e19771ae57b',
            'dataSource': 'RelesysAPI',
        ]
    ],
]);
$newUser = Relesys::users()->createUser($newUser);

// get user
$user = Relesys::users()->getUser('1cb8e33e-32d6-4353-9b15-93115d96580a');

// change user status
Relesys::users()->changeUserStatus(UserStatus::Disabled);

// get users (with filtering, sorting and pagination)
$queryParams = (new ApiQueryParams)
    ->addFilter('status', UserStatus::Activated->value)
    ->sortBy('name')
    ->limit(10);
$usersBatchResponse = Relesys::users()->getUsers(queryParams: $queryParams, page: 2);

// update user
$userPatch = (new UserPatch())
    ->title('Test title')
    ->birthDate(Carbon::parse('05-02-1991'))
    ->secondaryPhoneNumber(PhoneNumber::fromArray(['countryCode' => 47, 'number' => '777777']));
$user = Relesys::users()->updateUser('1cb8e33e-32d6-4353-9b15-93115d96580a', $userPatch);

// get department
Relesys::departments()->getDepartment('ef6a9dfe-b216-4303-829f-cf2e64bf72a1');

// get user group
Relesys::userGroups()->getUserGroup('f2610cc5-8466-4c9f-aa07-0175290e4f37');

// get custom fields
$customFieldsBatchResponse = Relesys::customFields()->getCustomFields();
```

You can find even more usage examples by checking out the package tests in the `/tests` directory.

Testing
-------

[](#testing)

Tests are based on [testbench](https://github.com/orchestral/testbench) package, which means that the tests can be run right away, with Laravel automatically bootstrapped.

Tests support two modes: in isolation *(faking requests)* or with real credentials *(real requests to the API)*. By default, tests are running in isolation, to use real requests: copy `phpunit.xml.dist` to `phpunit.xml`, uncomment lines with `RELESYS_CLIENT_ID``RELESYS_CLIENT_SECRET` and set the correspondent values there.

There's a docker configuration available here. I highly recommend using it for running the tests.

```
cd docker

docker compose up -d

docker exec -it relesys bash

# (optional) to debug a test with xdebug - there's an alias to activate it
# call the alias again to disable it
xdebug_cli_toggle

composer test
```

### Changelog

[](#changelog)

Please see [RELEASES](https://github.com/getsno/relesys-users/releases) for more information what has changed recently.

### Credits

[](#credits)

- [Anton Samofal](https://github.com/asamofal)

### License

[](#license)

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

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance90

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~112 days

Recently: every ~266 days

Total

11

Last Release

51d ago

Major Versions

v1.0.7 → v2.0.02024-04-25

v2.0.0 → v3.0.02025-07-31

v3.0.0 → v4.0.02026-05-13

PHP version history (3 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.2

v4.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ac55420538ff26b1160612fe3632ad1e0ca37f0474a26ccc149908aad0c237e?d=identicon)[asamofal](/maintainers/asamofal)

---

Top Contributors

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

---

Tags

apilaravellaravel-packagerelesyslaravel-packagegetsnorelesysrelesys-laravelrelesys-apirelesys-users

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/getsno-relesys-users/health.svg)

```
[![Health](https://phpackages.com/badges/getsno-relesys-users/health.svg)](https://phpackages.com/packages/getsno-relesys-users)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.7k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

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