PHPackages                             lix-url/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. [API Development](/categories/api)
4. /
5. lix-url/php-sdk

ActiveLibrary[API Development](/categories/api)

lix-url/php-sdk
===============

Official PHP SDK for the Lix.li API.

v0.1.0(yesterday)01↑2900%MITPHPPHP ^8.2

Since Jun 8Pushed yesterdayCompare

[ Source](https://github.com/lix-url/php-sdk)[ Packagist](https://packagist.org/packages/lix-url/php-sdk)[ Docs](https://lix.li)[ RSS](/packages/lix-url-php-sdk/feed)WikiDiscussions master Synced yesterday

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

Lix.li PHP SDK
==============

[](#lixli-php-sdk)

Official PHP SDK for the Lix.li API.

[Lix.li](https://lix.li) is a URL shortening and link analytics platform with support for custom aliases, groups, tags, UTM parameters and detailed click tracking.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Composer

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

[](#installation)

```
composer require lix-url/php-sdk
```

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

[](#quick-start)

```
use Lix\Client;

$client = new Client('lix_live_xxx');
$link = $client->links()->create('https://example.com');
echo $link->link->shortUrl;
```

Profile
-------

[](#profile)

Get information about the authenticated account.

```
$profile = $client->profile()->get();

echo $profile->user->email;
```

Links
-----

[](#links)

### Create a Link

[](#create-a-link)

```
$link = $client->links()->create(
    url: 'https://example.com'
);

echo $link->link->shortUrl;
```

### Create a Link with Custom Alias

[](#create-a-link-with-custom-alias)

```
$link = $client->links()->create(
    url: 'https://example.com',
    alias: 'my-link'
);
```

### Create a Link with UTM Parameters

[](#create-a-link-with-utm-parameters)

```
$link = $client->links()->create(
    url: 'https://example.com',
    utm: [
        'source' => 'newsletter',
        'medium' => 'email',
        'campaign' => 'summer-sale',
    ]
);
```

### Get a Link

[](#get-a-link)

```
$link = $client->links()->get(123);

echo $link->url;
echo $link->shortUrl;
```

### Update a Link

[](#update-a-link)

```
$link = $client->links()->update(
    id: 123,
    title: 'Updated title'
);
```

### Delete a Link

[](#delete-a-link)

```
$client->links()->delete(123);
```

### List Links

[](#list-links)

```
$linksResponse = $client->links()->list();

foreach ($linksResponse->links as $link) {
    echo $link->shortUrl . PHP_EOL;
}
```

### Pagination

[](#pagination)

```
$links = $client->links()->list(
    limit: 100,
    fromId: 500
);
```

Groups
------

[](#groups)

### Create a Group

[](#create-a-group)

```
$group = $client->groups()->create(
    name: 'Marketing'
);

echo $group->name;
```

### Create a Rotating Group

[](#create-a-rotating-group)

```
$group = $client->groups()->create(
    name: 'Landing Pages',
    isRotate: true
);
```

### Get a Group

[](#get-a-group)

```
$group = $client->groups()->get(10);
```

### Update a Group

[](#update-a-group)

```
$group = $client->groups()->update(
    groupId: 10,
    description: 'Updated description'
);
```

### Delete a Group

[](#delete-a-group)

```
$client->groups()->delete(10);
```

### List Groups

[](#list-groups)

```
$response = $client->groups()->list(limit: 10, fromId: 1000);

foreach ($response->groups as $group) {
    echo $group->name . PHP_EOL;
}
```

Error Handling
--------------

[](#error-handling)

```
use Lix\Exceptions\UnauthorizedException;
use Lix\Exceptions\ValidationException;

try {
    $client->links()->create(
        url: 'invalid-url'
    );
} catch (ValidationException $e) {
    // Validation failed

    // Validation error fields data
    var_dump($e->data);
} catch (UnauthorizedException $e) {
    // Invalid API key
}
```

Documentation
-------------

[](#documentation)

- API Documentation:
- OpenAPI Specification:

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43852693?v=4)[Denis Neizhmak](/maintainers/deneiz)[@Deneiz](https://github.com/Deneiz)

---

Top Contributors

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

---

Tags

apisdkanalyticsurl shortenerlixlinks-management

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3751.2M45](/packages/tencentcloud-tencentcloud-sdk-php)[resend/resend-php

Resend PHP library.

596.2M34](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.5M10](/packages/checkout-checkout-sdk-php)[clicksend/clicksend-php

351.6M11](/packages/clicksend-clicksend-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74287.1k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

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