PHPackages                             songxunzhao/freshdesk-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. songxunzhao/freshdesk-php-sdk

ActiveLibrary[API Development](/categories/api)

songxunzhao/freshdesk-php-sdk
=============================

PHP SDK for the Freshdesk API (v2)

0.0.1(4y ago)02.2k↑157.1%MITPHPPHP &gt;=5.5.0

Since Apr 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/songxunzhao/freshdesk-php-sdk)[ Packagist](https://packagist.org/packages/songxunzhao/freshdesk-php-sdk)[ Docs](https://github.com/songxunzhao/freshdesk-php-sdk)[ RSS](/packages/songxunzhao-freshdesk-php-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Freshdesk PHP SDK API v2
========================

[](#freshdesk-php-sdk-api-v2)

[![Latest Stable Version](https://camo.githubusercontent.com/1c637a539e5edd12764a68fa1f477d247ec7ed941af323a330394686993849f6/687474703a2f2f706f7365722e707567782e6f72672f736f6e6778756e7a68616f2f66726573686465736b2d7068702d73646b2f76)](https://packagist.org/packages/songxunzhao/freshdesk-php-sdk) [![Total Downloads](https://camo.githubusercontent.com/203b8bd70e391cbac6339f2ec5a6208e78b2dfb2b6ee66945745753e8f8f8c9e/687474703a2f2f706f7365722e707567782e6f72672f736f6e6778756e7a68616f2f66726573686465736b2d7068702d73646b2f646f776e6c6f616473)](https://packagist.org/packages/songxunzhao/freshdesk-php-sdk) [![Latest Unstable Version](https://camo.githubusercontent.com/4f898aaedf15018142a2600c131f8c20f36bc6666ba85b875e40bb612c7e879a/687474703a2f2f706f7365722e707567782e6f72672f736f6e6778756e7a68616f2f66726573686465736b2d7068702d73646b2f762f756e737461626c65)](https://packagist.org/packages/songxunzhao/freshdesk-php-sdk) [![License](https://camo.githubusercontent.com/4d54dd5832e1744fad189b44a76dbc30842d5096ff13b0ace9a7f8b98af962d2/687474703a2f2f706f7365722e707567782e6f72672f736f6e6778756e7a68616f2f66726573686465736b2d7068702d73646b2f6c6963656e7365)](https://packagist.org/packages/songxunzhao/freshdesk-php-sdk) [![PHP Version Require](https://camo.githubusercontent.com/3f410a512bcb1a1ac39b9155c9148f06a31747b14211a3ffdb978941a15bb33c/687474703a2f2f706f7365722e707567782e6f72672f736f6e6778756e7a68616f2f66726573686465736b2d7068702d73646b2f726571756972652f706870)](https://packagist.org/packages/songxunzhao/freshdesk-php-sdk)

This is a PHP 5.5+ SDK for the [Freshdesk](https://www.freshdesk.com) API v2.

If you have questions, please contact me or open an issue on GitHub.

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

[](#quick-start)

```
require __DIR__ . '/vendor/autoload.php';
use \Freshdesk\Api;

$api = new Api("your_freshdesk_api_key", "your_freshdesk_domain");

$all = $api->tickets->all();
$some = $api->tickets->all(['page' => 2]);
$new = $api->tickets->create($data);
$updated = $api->tickets->update($data);
$api->tickets->delete($id);
$existing = $api->tickets->view($id);

//Responses are simple arrays, e.g.:
$id = $existing['id'];
$first = $all[0];

```

Framework Integration
---------------------

[](#framework-integration)

- Symfony - [FreshdeskBundle](https://github.com/mpclarkson/freshdesk-bundle)
- Laravel/Lumen - [Freshdesk Larvel Service Provider](https://github.com/mpclarkson/freshdesk-laravel) .

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

[](#installation)

To integrate this library into your application, use [Composer](https://getcomposer.org).

Add `mpclarkson/freshdesk-php-sdk` to your **composer.json** file:

```
{
    "require": {
        "songxunzhao/freshdesk-php-sdk": "dev-master"
    }
}
```

Then run:

```
php composer.phar install
```

API Overview
------------

[](#api-overview)

Full documentation is available [here](docs/ApiIndex.md)

### Getting started

[](#getting-started)

Creating a new API instance is very easy. All you need is your Freshdesk API key and your Freshdesk domain.

```
require __DIR__ . '/vendor/autoload.php';
use \Freshdesk\Api;

$api = new Api("your_freshdesk_api_key", "your_freshdesk_domain");
```

### Resources

[](#resources)

The available methods for each resource are available via a public property on the api, for example:

```
//Contacts
$contacts = $api->contacts->update($contactId, $data);

//Agents
$me = $api->agents->current();

//Companies
$company = $api->companies->create($data);

//Groups
$deleted = $api->groups->delete($groupId);

//Tickets
$ticket = $api->tickets->view($filters);

//Time Entries
$time = $api->timeEntries->all($ticket['id']);

//Conversations
$ticket = $api->conversations->note($ticketId, $data);

//Categories
$newCategory = $api->categories->create($data);

//Forums
$forum = $api->forums->create($categoryId, $data);

//Topics
$topics = $api->topics->monitor($topicId, $userId);

//Comments
$comment = $api->comments->create($forumId);

//Email Configs
$configs = $api->emailConfigs->all();

//Products
$product = $api->products->view($productId);

//Business Hours
$hours = $api->businessHours->all();

//SLA Policy
$policies = $api->slaPolicies->all();
```

### Responses

[](#responses)

All responses are arrays of data. Please refer to Freshdesk's documentation for further information.

### Filtering

[](#filtering)

All `GET` requests accept an optional `array $query` parameter to filter results. For example:

```
//Page 2 with 50 results per page
$page2 = $this->forums->all(['page' => 2, 'per_page' => 50]);

//Tickets for a specific customer
$tickets = $this->tickets->view(['company_id' => $companyId]);
```

Please read the Freshdesk documentation for further information on filtering `GET` requests.

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

[](#contributing)

This is a work in progress and PRs are welcome. Please read the [contributing guide](.github/CONTRIBUTING.md).

Nearly all api calls are available except for the `Solutions` and `Surveys`, which Freshdesk has not yet implemented.

- Solutions
- Surveys
- Uploading files is not yet supported
- More tests. You can never have enough!
- Nicer documentation

Author
------

[](#author)

The library was written and maintained by [Zhao SongXun](https://songxunzhao.github.io/)from [Hilenium](https://hilenium.com).

Reference
---------

[](#reference)

- [Freshdesk API Documentation](https://developer.freshdesk.com/api/)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

1543d ago

### Community

Maintainers

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

---

Top Contributors

[![mpclarkson](https://avatars.githubusercontent.com/u/4843821?v=4)](https://github.com/mpclarkson "mpclarkson (13 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (6 commits)")[![songxunzhao](https://avatars.githubusercontent.com/u/4676867?v=4)](https://github.com/songxunzhao "songxunzhao (4 commits)")[![gtapps](https://avatars.githubusercontent.com/u/16778396?v=4)](https://github.com/gtapps "gtapps (3 commits)")[![OneHatRepo](https://avatars.githubusercontent.com/u/13893545?v=4)](https://github.com/OneHatRepo "OneHatRepo (2 commits)")[![gielwijgergangs](https://avatars.githubusercontent.com/u/1364607?v=4)](https://github.com/gielwijgergangs "gielwijgergangs (1 commits)")[![vdechenaux](https://avatars.githubusercontent.com/u/1501825?v=4)](https://github.com/vdechenaux "vdechenaux (1 commits)")

---

Tags

apisupporthelp deskFreshdeskcustomer service

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/songxunzhao-freshdesk-php-sdk/health.svg)

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

###  Alternatives

[mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

35680.2k5](/packages/mpclarkson-freshdesk-php-sdk)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[helpscout/api

Help Scout API v2 Client

1022.4M4](/packages/helpscout-api)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[mpclarkson/freshdesk-laravel

Laravel package for the Freshdesk API (v2)

1967.8k](/packages/mpclarkson-freshdesk-laravel)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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