Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antoinelemaire/aircall-php
PHP bindings for the Aircall API http://developer.aircall.io/
https://github.com/antoinelemaire/aircall-php
aircall aircall-php composer
Last synced: 3 months ago
JSON representation
PHP bindings for the Aircall API http://developer.aircall.io/
- Host: GitHub
- URL: https://github.com/antoinelemaire/aircall-php
- Owner: AntoineLemaire
- License: mit
- Created: 2017-01-25T11:03:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-03T12:24:04.000Z (about 1 year ago)
- Last Synced: 2024-04-29T10:37:16.480Z (9 months ago)
- Topics: aircall, aircall-php, composer
- Language: PHP
- Size: 38.1 KB
- Stars: 10
- Watchers: 3
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
This is a non-official Aircall PHP library which provides access to the Aircall API from applications written in the PHP language.
Api references: https://developer.aircall.io/api-references/
## API version
Last update: 1.11.2## Installation
The recommended way to install aircall-php is through [Composer](https://getcomposer.org):
```
composer require antoinelemaire/aircall-php
```## Usage
### Clients```php
use Aircall\AircallClient;$client = new AircallClient(appId, apiKey);
// Test purpose
$client->ping();
```### Company
```php
// Get generic data about the account
$client->company->get();
```### Users
```php
// Get a user by ID
$client->users->get(155468);// List all users
$client->users->list();
```### Calls
```php
// Get a call by ID
$client->calls->get(155468);// List all calls
$client->calls->list();// Search calls
$client->calls->search([
'tags' => 'myTag',
]);// Display a link in-app to the User who answered a specific Call.
$client->calls->link(155468, [
'link' => 'http://something.io/mypage'
]);// Transfer the Call to another user.
$client->calls->transfert(1644658, [
'user_id' => 8945487
]);// Delete the recording of a specific Call.
$client->calls->deleteRecording(795312);// Delete the voicemail of a specific Call.
$client->calls->deleteVoicemail(13877988);
```### Contacts
```php
// List all contacts
$client->contacts->list();// Get a contact by ID
$client->contacts->get(699421);// Create a contact
$client->contacts->create([
'first_name' => 'John',
'last_name' => 'Doe',
'information' => 'TEST',
'phone_numbers' => [
[
'label' => 'Work',
'value' => '+33631000000',
],
],
'emails' => [
[
'label' => 'Work',
'value' => '[email protected]',
],
],
]);// Search contacts
$client->contacts->search([
'phone_number' => '+33631000000',
'email' => '[email protected]'
]);// Update data for a specific Contact
$client->contacts->update(165451, [
'first_name' => 'John',
'last_name' => 'Doe',
'information' => 'TEST',
'phone_numbers' => [
[
'label' => 'Work',
'value' => '+33631000000',
],
],
'emails' => [
[
'label' => 'Work',
'value' => '[email protected]',
],
],
]);// Delete a specific Contact
$client->contacts->delete(325459);
```
### Tags
TODO
### Webhooks
TODO
### Teams
TODO