PHPackages                             doniyor/bitrix24-laravel - 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. doniyor/bitrix24-laravel

ActiveLibrary[API Development](/categories/api)

doniyor/bitrix24-laravel
========================

Laravel integration for the Bitrix24 REST API with CRM entity helpers.

4.0(8mo ago)05MITPHPPHP ^8.1

Since Oct 20Pushed 8mo agoCompare

[ Source](https://github.com/Lanser0614/Bitrix24RestApi)[ Packagist](https://packagist.org/packages/doniyor/bitrix24-laravel)[ RSS](/packages/doniyor-bitrix24-laravel/feed)WikiDiscussions main Synced today

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

Doniyor Bitrix24 Laravel Package
================================

[](#doniyor-bitrix24-laravel-package)

Laravel wrapper around the Bitrix24 REST API with a focus on CRM entities.

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

[](#installation)

```
composer require doniyor/bitrix24-laravel
```

Publish configuration:

```
php artisan vendor:publish --tag=bitrix24-config
```

Configure the following environment variables:

```
BITRIX24_BASE_URI="https://your-domain.bitrix24.com/rest/"
BITRIX24_WEBHOOK_USER=1
BITRIX24_WEBHOOK_CODE=abcdefghijklmno
# Optional when using OAuth:
# BITRIX24_AUTH_TOKEN="oauth_access_token"

```

Authentication
--------------

[](#authentication)

- Incoming webhook: supply `BITRIX24_BASE_URI`, `BITRIX24_WEBHOOK_USER`, and `BITRIX24_WEBHOOK_CODE`. Requests are routed to `{base}/{user}/{code}/{method}.json` automatically. Leave the auth token unset.
- OAuth: omit webhook credentials and provide `BITRIX24_AUTH_TOKEN`. The client sends the token as the `auth` query parameter.

If both webhook credentials and an auth token are present, the webhook path takes precedence.

Usage
-----

[](#usage)

Access the manager with dependency injection:

```
use Doniyor\Bitrix24\Bitrix24Manager;
use Doniyor\Bitrix24\DTO\CRM\LeadFieldsDto;

public function __construct(private Bitrix24Manager $bitrix) {}

public function createLead(): int
{
    return $this->bitrix->crm()->leads()->add(
        new LeadFieldsDto(
            title: 'New lead',
            name: 'Jane',
            lastName: 'Doe',
            phones: [
                ['VALUE' => '+123456789', 'VALUE_TYPE' => 'WORK'],
            ],
            emails: [
                ['VALUE' => 'jane@example.com', 'VALUE_TYPE' => 'WORK'],
            ],
        )
    );
}
```

Or via the facade:

```
use Doniyor\Bitrix24\Facades\Bitrix24;
use Doniyor\Bitrix24\DTO\CRM\LeadFieldsDto;

$lead = Bitrix24::crm()->leads()->get(42);

Bitrix24::crm()->leads()->update(
    42,
    (new LeadFieldsDto(title: 'Existing lead'))
        ->withExtra(['STATUS_ID' => 'CONVERTED'])
);
```

Supported CRM services
----------------------

[](#supported-crm-services)

- Leads
- Deals
- Contacts
- Companies
- Products
- Product Sections
- Quotes
- Invoices
- Activities
- Requisites
- Deal Categories
- Statuses
- Stages
- Currencies

For other CRM entities, use `Bitrix24::crm()->service('entityName')`.

Field DTOs
----------

[](#field-dtos)

- All `add` and `update` operations expect an implementation of `Doniyor\Bitrix24\DTO\FieldsDtoInterface`.
- Use any of the ready-made CRM DTOs for type-safe payloads:
    - `Doniyor\Bitrix24\DTO\CRM\LeadFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\DealFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\ContactFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\CompanyFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\ProductFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\ProductSectionFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\QuoteFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\InvoiceFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\ActivityFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\RequisiteFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\DealCategoryFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\StatusFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\StageFieldsDto`
    - `Doniyor\Bitrix24\DTO\CRM\CurrencyFieldsDto`
- Use `Doniyor\Bitrix24\DTO\GenericFieldsDto` for quick array-backed payloads.
- Create your own DTO classes to add validation, defaults, or IDE type safety before making requests.

Response DTOs &amp; Mappers
---------------------------

[](#response-dtos--mappers)

- Services still return the raw Bitrix24 payload arrays so you can keep existing behaviour.
- When you want typed objects, use the dedicated mappers:
    - `Doniyor\Bitrix24\CRM\Mappers\LeadResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\LeadData`
    - `Doniyor\Bitrix24\CRM\Mappers\DealResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\DealData`
    - `Doniyor\Bitrix24\CRM\Mappers\ContactResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\ContactData`
    - `Doniyor\Bitrix24\CRM\Mappers\CompanyResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\CompanyData`
    - `Doniyor\Bitrix24\CRM\Mappers\ProductResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\ProductData`
    - `Doniyor\Bitrix24\CRM\Mappers\ProductSectionResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\ProductSectionData`
    - `Doniyor\Bitrix24\CRM\Mappers\QuoteResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\QuoteData`
    - `Doniyor\Bitrix24\CRM\Mappers\InvoiceResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\InvoiceData`
    - `Doniyor\Bitrix24\CRM\Mappers\ActivityResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\ActivityData`
    - `Doniyor\Bitrix24\CRM\Mappers\RequisiteResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\RequisiteData`
    - `Doniyor\Bitrix24\CRM\Mappers\DealCategoryResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\DealCategoryData`
    - `Doniyor\Bitrix24\CRM\Mappers\StatusResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\StatusData`
    - `Doniyor\Bitrix24\CRM\Mappers\StageResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\StageData`
    - `Doniyor\Bitrix24\CRM\Mappers\CurrencyResponseMapper` → `Doniyor\Bitrix24\DTO\CRM\Response\CurrencyData`
- Example usage:

```
use Doniyor\Bitrix24\Facades\Bitrix24;
use Doniyor\Bitrix24\CRM\Mappers\LeadResponseMapper;

$payload = Bitrix24::crm()->leads()->get(42);
$lead = app(LeadResponseMapper::class)->map($payload);

echo $lead->title;
```

Bitrix24RestApi
===============

[](#bitrix24restapi)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance60

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Total

4

Last Release

257d ago

Major Versions

1.0 → 2.02025-10-20

2.0 → 3.02025-10-20

3.0 → 4.02025-10-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62260034?v=4)[Doniyor](/maintainers/Lanser0614)[@Lanser0614](https://github.com/Lanser0614)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/doniyor-bitrix24-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/doniyor-bitrix24-laravel/health.svg)](https://phpackages.com/packages/doniyor-bitrix24-laravel)
```

###  Alternatives

[craftcms/cms

Craft CMS

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

TencentCloudApi php sdk

3741.3M46](/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)
