PHPackages                             devmatika/desk365 - 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. devmatika/desk365

ActiveLibrary[API Development](/categories/api)

devmatika/desk365
=================

Desk365 API integration for Laravel

2.3(1mo ago)1642MITPHPPHP ^8.0

Since Jan 18Pushed 2w agoCompare

[ Source](https://github.com/devmatika/desk365)[ Packagist](https://packagist.org/packages/devmatika/desk365)[ Docs](https://github.com/devmatika/desk365)[ RSS](/packages/devmatika-desk365/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (28)Versions (6)Used By (0)

Desk365 API Integration for Laravel
===================================

[](#desk365-api-integration-for-laravel)

Laravel Package for complete integration with Desk365 Ticketing API. This package provides comprehensive access to all Desk365 API endpoints including Tickets, Agents, Customers, Comments, Attachments, and Reports.

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

[](#installation)

You can install the package via composer:

```
composer require devmatika/desk365
```

You can publish the config file with:

```
php artisan vendor:publish --tag="desk365-config"
```

The published `config/desk365.php` includes HTTP client keys (`base_url`, `api_key`, `api_secret`, `timeout`, `retry_attempts`, `retry_backoff`, `version`, `from_email`, optional `headers`) plus optional application keys used by larger integrations: custom Desk365 field names, OLC payload limits, Laravel queue names / listen order, `bulk_sync` throttling, `knowledge_base_sync` KB pull settings, and `conversation_webhook_resync_delay_seconds`. API key also falls back to `DESK_API_KEY` when `DESK365_API_KEY` is empty; same for `DESK_API_SECRET`. See the published file for the authoritative list and env variable names.

Configuration
-------------

[](#configuration)

Add the following to your `.env` file:

```
DESK365_BASE_URL=https://api.desk365.com
DESK365_API_KEY=your_api_key_here
DESK365_API_SECRET=your_api_secret_here
DESK365_TIMEOUT=30
DESK365_RETRY_ATTEMPTS=3
DESK365_API_VERSION=v3
```

Usage
-----

[](#usage)

### Using the Facade

[](#using-the-facade)

```
use Devmatika\Desk365\Facades\Desk365;
use Devmatika\Desk365\DTO\{
    TicketCreateDto,
    TicketUpdateDto,
    TicketFilterDto,
    CommentDto,
    AgentDto,
    CustomerDto,
    ApiConfigDto
};

// Initialize with config
$config = new ApiConfigDto(
    baseUrl: config('desk365.base_url'),
    apiKey: config('desk365.api_key'),
    apiSecret: config('desk365.api_secret'),
    timeout: config('desk365.timeout', 30),
    version: config('desk365.version', 'v3')
);

Desk365::init($config);
```

Available API Methods
---------------------

[](#available-api-methods)

### Ticket Operations

[](#ticket-operations)

#### Get All Tickets

[](#get-all-tickets)

```
$filters = new TicketFilterDto(
    status: 'open',
    priority: 'high',
    page: 1,
    perPage: 20
);
$response = Desk365::getAllTickets($filters);
```

#### Get Single Ticket

[](#get-single-ticket)

```
$response = Desk365::getTicket('TKT-001');
```

#### Create Ticket

[](#create-ticket)

```
$ticketData = new TicketCreateDto(
    email: 'customer@example.com',
    subject: 'Support Request',
    description: 'I need help with my account',
    assignedTo: 'agent_1',
    group: 'support',
    category: 'technical',
    status: 'open',
    priority: 1,
    type: 'Question'
);

$response = Desk365::createTicket($ticketData);
```

#### Create Ticket with Attachment

[](#create-ticket-with-attachment)

```
$ticketData = new TicketCreateDto(
    email: 'customer@example.com',
    subject: 'Support Request',
    description: 'I need help',
    assignedTo: 'agent_1',
    group: 'support',
    category: 'technical',
    file: $request->file('attachment')
);

$response = Desk365::createTicket($ticketData);
```

#### Update Ticket

[](#update-ticket)

```
$updateData = new TicketUpdateDto(
    status: 'in_progress',
    priority: 2,
    assignedTo: 'agent_2'
);

$response = Desk365::updateTicket('TKT-001', $updateData);
```

#### Delete Ticket

[](#delete-ticket)

```
$response = Desk365::deleteTicket('TKT-001');
```

#### Search Tickets

[](#search-tickets)

```
$filters = new TicketFilterDto(status: 'open');
$response = Desk365::searchTickets('support request', $filters);
```

#### Close/Reopen Ticket

[](#closereopen-ticket)

```
$response = Desk365::closeTicket('TKT-001');
$response = Desk365::reopenTicket('TKT-001');
```

#### Update Ticket Status/Priority

[](#update-ticket-statuspriority)

```
$response = Desk365::updateTicketStatus('TKT-001', 'closed');
$response = Desk365::updateTicketPriority('TKT-001', '3');
```

### Comment Operations

[](#comment-operations)

#### Get All Comments

[](#get-all-comments)

```
$response = Desk365::getComments('TKT-001', ['page' => 1, 'per_page' => 20]);
```

#### Get Single Comment

[](#get-single-comment)

```
$response = Desk365::getComment('TKT-001', 'comment_123');
```

#### Add Comment

[](#add-comment)

```
$comment = new CommentDto(
    content: 'This is a test comment',
    authorId: 'agent_1',
    authorName: 'John Doe',
    authorType: 'agent',
    isPublic: true
);

$response = Desk365::addComment('TKT-001', $comment);
```

#### Update Comment

[](#update-comment)

```
$comment = new CommentDto(content: 'Updated comment');
$response = Desk365::updateComment('TKT-001', 'comment_123', $comment);
```

#### Delete Comment

[](#delete-comment)

```
$response = Desk365::deleteComment('TKT-001', 'comment_123');
```

### Attachment Operations

[](#attachment-operations)

#### Upload Attachment

[](#upload-attachment)

```
$response = Desk365::uploadAttachment('TKT-001', $file, [
    'filename' => 'document.pdf',
    'description' => 'Support document'
]);
```

#### Get All Attachments

[](#get-all-attachments)

```
$response = Desk365::getAttachments('TKT-001');
```

#### Get Single Attachment

[](#get-single-attachment)

```
$response = Desk365::getAttachment('TKT-001', 'attachment_123');
```

#### Delete Attachment

[](#delete-attachment)

```
$response = Desk365::deleteAttachment('TKT-001', 'attachment_123');
```

#### Download Attachment

[](#download-attachment)

```
$response = Desk365::downloadAttachment('TKT-001', 'attachment_123');
```

### Agent Operations

[](#agent-operations)

#### Get All Agents

[](#get-all-agents)

```
$response = Desk365::getAllAgents(['page' => 1, 'per_page' => 20]);
```

#### Get Single Agent

[](#get-single-agent)

```
$response = Desk365::getAgent('agent_123');
```

#### Create Agent

[](#create-agent)

```
$agentData = new AgentDto(
    name: 'John Doe',
    email: 'john@example.com',
    phone: '+1234567890',
    role: 'agent',
    isActive: true
);

$response = Desk365::createAgent($agentData);
```

#### Update Agent

[](#update-agent)

```
$agentData = new AgentDto(name: 'Jane Doe', role: 'admin');
$response = Desk365::updateAgent('agent_123', $agentData);
```

#### Delete Agent

[](#delete-agent)

```
$response = Desk365::deleteAgent('agent_123');
```

### Customer Operations

[](#customer-operations)

#### Get All Customers

[](#get-all-customers)

```
$response = Desk365::getAllCustomers(['page' => 1, 'per_page' => 20]);
```

#### Get Single Customer

[](#get-single-customer)

```
$response = Desk365::getCustomer('customer_123');
```

#### Create Customer

[](#create-customer)

```
$customerData = new CustomerDto(
    name: 'John Customer',
    email: 'customer@example.com',
    phone: '+1234567890',
    company: 'Example Corp'
);

$response = Desk365::createCustomer($customerData);
```

#### Update Customer

[](#update-customer)

```
$customerData = new CustomerDto(name: 'Jane Customer');
$response = Desk365::updateCustomer('customer_123', $customerData);
```

#### Delete Customer

[](#delete-customer)

```
$response = Desk365::deleteCustomer('customer_123');
```

#### Search Customers

[](#search-customers)

```
$response = Desk365::searchCustomers('john', ['page' => 1]);
```

### Report Operations

[](#report-operations)

#### Get Ticket Statistics

[](#get-ticket-statistics)

```
$filters = new TicketFilterDto(status: 'open', dateFrom: '2024-01-01');
$response = Desk365::getTicketStatistics($filters);
```

#### Get Agent Statistics

[](#get-agent-statistics)

```
$response = Desk365::getAgentStatistics('agent_123', '2024-01-01', '2024-12-31');
```

#### Get Dashboard Data

[](#get-dashboard-data)

```
$response = Desk365::getDashboardData(['date_from' => '2024-01-01']);
```

Response Format
---------------

[](#response-format)

All methods return an `ApiResponseDto` object:

```
$response = Desk365::createTicket($ticketData);

if ($response->isSuccess()) {
    $data = $response->getData();
    $message = $response->getMessage();
    $statusCode = $response->getStatusCode();
    $meta = $response->getMeta(); // For pagination, etc.
} else {
    $errors = $response->getErrors();
    $message = $response->getMessage();
    $statusCode = $response->getStatusCode();
}
```

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

[](#error-handling)

The package automatically handles errors and returns appropriate error responses:

```
$response = Desk365::getTicket('invalid_id');

if ($response->isError()) {
    Log::error('Desk365 Error', [
        'message' => $response->getMessage(),
        'errors' => $response->getErrors(),
        'status_code' => $response->getStatusCode()
    ]);
}
```

Testing
-------

[](#testing)

```
cd desk365api
composer install
composer test
```

API Documentation
-----------------

[](#api-documentation)

For complete API documentation, visit: [Desk365 API Docs](https://apps.desk365.io/apis/api-docs.html)

Support
-------

[](#support)

If you find this plugin useful and want to support its development, you can donate here:

**[Donate via NOWPayments](https://nowpayments.io/donation/davood)**

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

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

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance94

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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 ~30 days

Total

5

Last Release

44d ago

Major Versions

1.0 → 2.02026-01-29

### Community

Maintainers

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

---

Top Contributors

[![davoodf1995](https://avatars.githubusercontent.com/u/19805938?v=4)](https://github.com/davoodf1995 "davoodf1995 (18 commits)")[![mohammadjavad948](https://avatars.githubusercontent.com/u/52201992?v=4)](https://github.com/mohammadjavad948 "mohammadjavad948 (4 commits)")

---

Tags

apilaravelticketingdesk365devmatika

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/devmatika-desk365/health.svg)

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.8k3](/packages/defstudio-telegraph)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[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)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)

PHPackages © 2026

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