Giter Club home page Giter Club logo

aircall-php's Introduction

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:

composer require antoinelemaire/aircall-php

Usage

Clients

use Aircall\AircallClient;

$client = new AircallClient(appId, apiKey);

// Test purpose
$client->ping();

Company

// Get generic data about the account
$client->company->get();

Users

// Get a user by ID
$client->users->get(155468);

// List all users
$client->users->list();

Calls

// 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

// 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.