PHPackages                             amalfra/supportbee - 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. amalfra/supportbee

ActiveLibrary[API Development](/categories/api)

amalfra/supportbee
==================

A PHP library for interacting with SupportBee API

v3.0.0(2mo ago)11.1k6MITPHPPHP &gt;=8.4.0CI passing

Since Oct 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/amalfra/supportbee)[ Packagist](https://packagist.org/packages/amalfra/supportbee)[ Docs](https://developers.supportbee.com)[ RSS](/packages/amalfra-supportbee/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (15)Used By (0)

SupportBee API
==============

[](#supportbee-api)

[![GitHub release](https://camo.githubusercontent.com/55a133254f4bac878089906da64bf70da54862c739b0510f5d2625e638cce8d7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616d616c6672612f737570706f72746265652e737667)](https://github.com/amalfra/supportbee/releases)[![Build Status](https://github.com/amalfra/supportbee/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/amalfra/supportbee/actions/workflows/test.yml/badge.svg?branch=main)[![Coverage Status](https://camo.githubusercontent.com/b401b1c774650b871c5f7df0fc58ba185680ffb5542c3473cc4f22dbc8a8c87a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616d616c6672612f737570706f72746265652f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/amalfra/supportbee?branch=main)

A PHP wrapper for the SupportBee REST API.

> You can find your API token in Settings &gt; API Token screen. See  for more.

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

[](#installation)

In your project root, run the following:

```
composer require amalfra/supportbee
```

This will create a `vendor` directory (if you dont already have one), and set up the autoloading classmap.

Usage
-----

[](#usage)

Once everything is installed, you should be able to load the composer autoloader in your code.

You can load the wrapper classes using namespace as:

```
require __DIR__ . '/vendor/autoload.php';

use \Amalfra\SupportBee\Client as SupportBee;
```

Now create a new object

```
$supportbee = new SupportBee();
```

At this stage you can also supply the configuration parameter `token, company` which is used throughout the API. These can be passed directly as array:

```
$config = array(
	'token' => 'your token',
	'company' => 'your company name'
);

$supportbee = new SupportBee($config);
```

Now the available API calls can be done using the instance. All the result from API will be returned as associative array. If any status code other than 200 is returned an exception would be thrown.

Available API methods
---------------------

[](#available-api-methods)

**Please refer to  for available parameter details.**

Incase of multiple paramters : Pass as an associative array. All method names follow Camel Casing.

### Tickets

[](#tickets)

1. *tickets* - Returns 15 tickets of the company in the order of their last activity. Only tickets that are not archived are returned (please see optional parameters to get archived tickets).
2. *ticket* - Retrieves the ticket specified by the id.
3. *searchTickets* - Returns 15 tickets of the company in the order of their last activity matching the search query.
4. *createTicket* - Creates a ticket for the company. Pass the information for ticket as associative array.
5. *deleteTicket* - Deletes a trashed ticket. Only Admins can delete a trashed ticket.
6. *archiveTicket* - Archives an unarchived ticket.
7. *unarchiveTicket* - Un-archives an archived ticket.
8. *assignTicketToUser* - Assign a ticket to a User. The first paramter is the ticket id. The second paramter is user\_id of the user.
9. *spamTicket* - Spam's an un-spammed ticket.
10. *unspamTicket* - Un-spam a spammed ticket.
11. *trashTicket* - Trashes an un-trashed ticket.
12. *untrashTicket* - Un-trashes a trashed ticket.
13. *addLabelToTicket* - Adds label to ticket. You can pass the ticket\_id and label name as parameters.
14. *removeLabelFromTicket* - Removes label from ticket. You can pass the ticket\_id and label name as parameters.

### Replies

[](#replies)

1. *replies* - Retrieves all the replies of the ticket with id ticket\_id.
2. *reply* - Retrieves the reply for ticket specified by the ticket\_id with id.

### Comments

[](#comments)

1. *comments* - Retrieves all the comments of the ticket with id ticket\_id.
2. *createComment* - Create a comment to the ticket with id ticket\_id. Pass the information for comment as associative array in second parameter.

### Agents

[](#agents)

1. *agents* - Retrieves all confirmed agents of the company.
2. *agent* - Retrieves the agent for company specified by the id.

### Labels

[](#labels)

1. *labels* - Retrieves all the custom labels of a company.

### Snippets

[](#snippets)

1. *snippets* - Returns all the snippets of the company.

### Reports

[](#reports)

1. *avgFirstResponseTimeReport* - Returns data points for average first response time.
2. *ticketsCountReport* - Returns data points for tickets count.
3. *repliesCountReport* - Returns data points for replies count.

### Emails

[](#emails)

1. *emails* - Returns all the emails of the company.
2. *createEmail* - Creates an email for the company. Pass the information for email as associative array in second parameter.

Development
-----------

[](#development)

Questions, problems or suggestions? Please post them on the [issue tracker](https://github.com/amalfra/supportbee/issues).

You can contribute changes by forking the project and submitting a pull request. You can ensure the tests are passing by running `vendor/bin/phpunit`. Feel free to contribute 😍

UNDER MIT LICENSE
=================

[](#under-mit-license)

The MIT License (MIT)

Copyright (c) 2014 Amal Francis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance86

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 96.4% 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 ~345 days

Recently: every ~373 days

Total

13

Last Release

75d ago

Major Versions

v0.0.5 → v1.0.02017-12-01

v1.1.0 → v2.0.02021-07-25

v2.2.2 → v3.0.02026-03-04

PHP version history (5 changes)v0.0.1PHP &gt;=5.3.3

v1.0.0PHP &gt;=7.0.0

v2.0.0PHP &gt;=7.4.0

v2.2.2PHP &gt;=8.1.0

v3.0.0PHP &gt;=8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/62dbb66d7ae914eb60df0092be27d4402b31c3f9dfdfb020978b99ac487657f4?d=identicon)[amalfra](/maintainers/amalfra)

---

Top Contributors

[![amalfra](https://avatars.githubusercontent.com/u/4033256?v=4)](https://github.com/amalfra "amalfra (80 commits)")[![CapturedMomentum](https://avatars.githubusercontent.com/u/12801429?v=4)](https://github.com/CapturedMomentum "CapturedMomentum (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![levi730](https://avatars.githubusercontent.com/u/154903?v=4)](https://github.com/levi730 "levi730 (1 commits)")

---

Tags

agentphpsupportbeeticketsupportbee

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/amalfra-supportbee/health.svg)

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

###  Alternatives

[razorpay/razorpay

Razorpay PHP Client Library

2024.8M44](/packages/razorpay-razorpay)[pubnub/pubnub

This is the official PubNub PHP SDK repository.

1314.6M17](/packages/pubnub-pubnub)[culqi/culqi-php

Cliente Culqi API para PHP

41356.8k1](/packages/culqi-culqi-php)[ahmadawais/sendy-php-api

Sendy PHP API Wrapper: Complete API interfacing.

8673.5k](/packages/ahmadawais-sendy-php-api)[epayco/epayco-php

Epayco API client for PHP

25187.2k3](/packages/epayco-epayco-php)[yunchuang/appstore-connect-api

sdk for appstore connect api

3865.3k](/packages/yunchuang-appstore-connect-api)

PHPackages © 2026

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