PHPackages                             mttzzz/amoclient - 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. mttzzz/amoclient

ActiveLibrary[API Development](/categories/api)

mttzzz/amoclient
================

AmoClient

3.0.31(1mo ago)21.7kMITPHPPHP ^8.1|^8.2|^8.3|^8.4CI passing

Since Aug 26Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/mttzzz/amoclient)[ Packagist](https://packagist.org/packages/mttzzz/amoclient)[ Docs](https://github.com/mttzzz/amoclient)[ RSS](/packages/mttzzz-amoclient/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (195)Used By (0)

AmoClient
=========

[](#amoclient)

\[!\[Latest Version on Packagist\]\[ico-version\]\]\[link-packagist\]

Клиент для amoCRM.

Installation
============

[](#installation)

Via Composer

```
$ composer require mttzzz/amoclient
```

\#Usage

```
$amo = new AmoClient($key);
```

\##Account

### get

[](#get)

[https://www.amocrm.ru/developers/content/crm\_platform/account-info#with-96b1f0be-e739-4716-85ad-ec1799c5a11d-params](https://www.amocrm.ru/developers/content/crm_platform/account-info#with-96b1f0be-e739-4716-85ad-ec1799c5a11d-params)

```
$account = $amo->account;
$account
    ->withAmojoId()
    ->withAmojoRights()
    ->withUsersGroups()
    ->withTaskTypes()
    ->withVersion()
    ->withEntityNames()
    ->withDateTimeSettings()
    ->get();
```

\##Lead

### get

[](#get-1)

```
$leads = $amo->leads
->page(2)
->limit(10)
->query('test')
->orderByCreatedAtAsc()
->orderByCreatedAtDesc()
->orderByUpdatedAtAsc()
->orderByUpdatedAtDesc()
->orderByIdAsc()
->orderByIdDesc()
->withCatalogElements()
->withIsPriceModifiedByRobot()
->withLossReason()
->withContacts()
->withOnlyDeleted()
->get();
$lead = $amo->leads->find(27211533);
```

### filter

[](#filter)

```
$leads = $amo->leads
->filterId($id)
->filterName($name)
->filterCreatedBy($createdBy)
->filterResponsibleUserId($id)
->filterCreatedAt($from, $to)
->filterUpdatedAt($from, $to)
->filterClosestTaskAt($from, $to)
->filterCustomField($fieldId, $value)
->filterCustomFieldFromTo($fieldId, $from, $to)
->filterPhone($phone)
->filterEmail($email)

->get();
$lead = $amo->leads->find(27211533);
```

### link

[](#link)

```
$link = $amo->leads->entity(27222853)->links->catalogElement(811471, 4419, 2);
$link2 = $amo->leads->entity(27222853)->links->contact(43637153, false);
$link3 = $amo->leads->entity(27222853)->links->companies(43706869);
$link4 = $amo->leads->entity(27222853)->links->contact(43706907, true);
$amo->leads->entity(27222853)->links->link([$link, $link2, $link3, $link4]);
```

### unlink

[](#unlink)

```
$link = $amo->leads->entity(27222853)->links->catalogElement(811471, 4419, 2);
$link2 = $amo->leads->entity(27222853)->links->contact(43637153, false);
$link3 = $amo->leads->entity(27222853)->links->companies(43706869);
$link4 = $amo->leads->entity(27222853)->links->contact(43706907, true);
$amo->leads->entity(27222853)->links->unlink([$link, $link2, $link3, $link4]);
```

### createOne

[](#createone)

```
$lead = $amo->leads->entity();
$lead->name = 'testLead';
$lead->create();
```

### createMany

[](#createmany)

```
$lead = $amo->leads->entity();
$lead->name = 'testOne1';
$lead->status_id = 21714793;
$lead2 = $amo->leads->entity();
$lead2->name = 'testOne2';
$lead2->setCF(449541, 'test');
$lead2->price = 100;
$lead2->status_id = 21714793;
$lead2->responsible_user_id = 1693807;
$data = $amo->leads->create([$lead,$lead2]);
```

### createNote

[](#createnote)

```
$amo->leads->entity($leadId)->notes->common($text);
$amo->leads->entity($leadId)->notes->invoicePaid($text, $service, $icon_url);
$amo->leads->entity($leadId)->notes->smsIn($text, $phone);
$amo->leads->entity($leadId)->notes->smsOut($text, $phone);
$amo->leads->entity($leadId)->notes->callIn($uniq, $duration, $link, $phone, $source = 'ASTERISK');
$amo->leads->entity($leadId)->notes->callOut($uniq, $duration, $link, $phone, $source = 'ASTERISK');
```

### createTask

[](#createtask)

```
$amo->leads->entity(27211595)->tasks
->add($text, $responsible_user_id = null, $completeTill = null, $duration = null, $type = 2)
$amo->leads->entity(27211595)->tasks->add('text', 1693807,Carbon::now()->addHour()->timestamp, 60 * 60, 2);
```

### updateOne

[](#updateone)

```
$lead = $amo->leads->entity(27211595);
$lead->name = 'testOne22';
$lead->price = 222;
$lead->responsible_user_id = 1693807;
$lead->setCF(449541, 'test');
$lead->update();
```

### updateMany

[](#updatemany)

```
$ids = [27211595, 27211597];
$leads = [];
foreach ($ids as $id) {
    $lead = $amo->leads->entity($id);
    $lead->tag('updateMany');
    $leads[] = $lead;
    }
$amo->leads->update($leads);
```

### delete

[](#delete)

```
not work
```

\##Contact

### get

[](#get-2)

```
$leads = $amo->contacts
->page(2)
->limit(10)
->query('test')
->orderByCreatedAtAsc()
->orderByCreatedAtDesc()
->orderByUpdatedAtAsc()
->orderByUpdatedAtDesc()
->orderByIdAsc()
->orderByIdDesc()
->withCatalogElements()
->withLeads()
->withCustomers()
->get();
$contact = $amo->contacts->find(43680761);
```

### createOne

[](#createone-1)

```
$contact = $amo->contacts->entity();
$contact->name = 'test';
$contact->create();
```

### createMany

[](#createmany-1)

```
$contact = $amo->contacts->entity();
$contact->name = 'testOne1';
$contact2 = $amo->contacts->entity();
$contact2->name = 'testOne2';
$contact2->setCF(449541, 'test');
$contact2->emailAdd('test@test.loc')->phoneAdd(3752511111111);
$contact2->responsible_user_id = 1693807;
$data = $amo->contacts->create([$contact,$contact2]);
```

### createNote

[](#createnote-1)

```
$amo->leads->entity($leadId)->notes->common($text);
$amo->leads->entity($leadId)->notes->invoicePaid($text, $service, $icon_url);
$amo->leads->entity($leadId)->notes->smsIn($text, $phone);
$amo->leads->entity($leadId)->notes->smsOut($text, $phone);
$amo->leads->entity($leadId)->notes->callIn($uniq, $duration, $link, $phone, $source = 'ASTERISK');
$amo->leads->entity($leadId)->notes->callOut($uniq, $duration, $link, $phone, $source = 'ASTERISK');
```

### createTask

[](#createtask-1)

```
$amo->leads->entity(27211595)->tasks
->add($text, $responsible_user_id = null, $completeTill = null, $duration = null, $type = 2)
$amo->leads->entity(27211595)->tasks->add('text', 1693807,Carbon::now()->addHour()->timestamp, 60 * 60, 2);
```

### updateOne

[](#updateone-1)

```
$lead = $amo->leads->entity(27211595);
$lead->name = 'testOne22';
$lead->price = 222;
$lead->responsible_user_id = 1693807;
$lead->setCF(449541, 'test');
$lead->update();
```

### updateMany

[](#updatemany-1)

```
$ids = [27211595, 27211597];
$leads = [];
foreach ($ids as $id) {
    $lead = $amo->leads->entity($id);
    $lead->tag('updateMany');
    $leads[] = $lead;
    }
$amo->leads->update($leads);
```

### delete

[](#delete-1)

```
not work
```

\##Task

### create

[](#create)

```
$task1 = $amo->tasks->entity();
$task1->text = 'test1';
$task1->entity_type = 'leads';
$task1->entity_id = 27222853;
$task1->complete_till = Carbon::now('Europe/Minsk')->endOfDay()->timestamp;
$task2 = $amo->tasks->entity();
$task2->text = 'test2';
$task2->entity_type = 'leads';
$task2->entity_id = 27222853;
$task2->complete_till = Carbon::now('Europe/Minsk')->endOfDay()->timestamp;
$data = $amo->tasks->create([$task1, $task2]);
```

### update

[](#update)

```
$tasks = $amo->tasks->filterEntityId(27222853)->filterIsCompletedFalse()->get();
$updateTasks = [];
foreach ($tasks as $task) {
      $updateTask = $amo->tasks->entity($task['id']);
      $updateTask->is_completed = true;
      $updateTask->setResultText('Задача закрыта автоматически');
      $updateTasks[] = $updateTask;
    }
$amo->tasks->update($updateTasks);
```

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance98

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 58.2% 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 ~10 days

Recently: every ~29 days

Total

194

Last Release

44d ago

Major Versions

1.9.9 → 2.0.02021-01-20

2.96 → 3.0.02024-09-04

PHP version history (3 changes)2.91PHP ^7.2.5|^8.0

3.0.0PHP ^8.1

3.0.15PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

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

---

Top Contributors

[![divasilevskiy](https://avatars.githubusercontent.com/u/248040159?v=4)](https://github.com/divasilevskiy "divasilevskiy (171 commits)")[![mttzzz](https://avatars.githubusercontent.com/u/16290052?v=4)](https://github.com/mttzzz "mttzzz (123 commits)")

---

Tags

laravelAmoClient

### Embed Badge

![Health badge](/badges/mttzzz-amoclient/health.svg)

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

###  Alternatives

[rakibdevs/openweather-laravel-api

Laravel package to connect https://openweathermap.org/ to get customized weather data for any location on the globe immediately

7648.2k](/packages/rakibdevs-openweather-laravel-api)

PHPackages © 2026

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