PHPackages                             loopline-systems/closeio-api-wrapper - 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. loopline-systems/closeio-api-wrapper

AbandonedArchivedLibrary[API Development](/categories/api)

loopline-systems/closeio-api-wrapper
====================================

A PHP wrapper for the Close.io Api

v0.7.1(7y ago)15237.3k↓50%15[13 issues](https://github.com/loopline-systems/closeio-api-wrapper/issues)[4 PRs](https://github.com/loopline-systems/closeio-api-wrapper/pulls)1MITPHPPHP &gt;=5.6.0

Since Dec 9Pushed 4y ago11 watchersCompare

[ Source](https://github.com/loopline-systems/closeio-api-wrapper)[ Packagist](https://packagist.org/packages/loopline-systems/closeio-api-wrapper)[ RSS](/packages/loopline-systems-closeio-api-wrapper/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (18)Used By (1)

closeio-api-wrapper
===================

[](#closeio-api-wrapper)

[![License](https://camo.githubusercontent.com/651b4ff85e4eb1956d36872af51f1d690d4e2df81d08213ef88208caeff03549/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6f6f706c696e652d73797374656d732f636c6f7365696f2d6170692d777261707065722e737667)](http://opensource.org/licenses/MIT)[![Build Status](https://camo.githubusercontent.com/a75f1cd4fdcb6bc8659e271735154d1235d945e8868cf2ce25dc032531e738d3/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6c6f6f706c696e652d73797374656d732f636c6f7365696f2d6170692d777261707065722e737667)](https://travis-ci.org/loopline-systems/closeio-api-wrapper)[![Coverage Status](https://camo.githubusercontent.com/4f1eadf693e25c39cec4575917ee962fdd726f9010211de3015cd8e7199e3373/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6c6f6f706c696e652d73797374656d732f636c6f7365696f2d6170692d777261707065722e737667)](https://coveralls.io/r/loopline-systems/closeio-api-wrapper?branch=master)

[![Packagist](https://camo.githubusercontent.com/3c3ec99204aa0555add092ce6dce517e45232674d960d29911bdac58e12bd76f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6f706c696e652d73797374656d732f636c6f7365696f2d6170692d777261707065722e737667)](https://packagist.org/packages/loopline-systems/closeio-api-wrapper)[![Packagist](https://camo.githubusercontent.com/8dca545bd25ac9840935937032208e771f77ac2bacfbe7cd243865542b8af3fb/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6f706c696e652d73797374656d732f636c6f7365696f2d6170692d777261707065722e737667)](https://packagist.org/packages/loopline-systems/closeio-api-wrapper)[![Packagist](https://camo.githubusercontent.com/8199eff0a06a3985bc31ac94aa6e1ea37c396bbcfd032d881fa371c0de9efc8a/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6c6f6f706c696e652d73797374656d732f636c6f7365696f2d6170692d777261707065722e737667)](https://packagist.org/packages/loopline-systems/closeio-api-wrapper)[![Packagist](https://camo.githubusercontent.com/557e5ee8c4a55a8b23735940cd046ecacdd415df143b6ff2ad0601db8eaf39d7/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f6c6f6f706c696e652d73797374656d732f636c6f7365696f2d6170692d777261707065722e737667)](https://packagist.org/packages/loopline-systems/closeio-api-wrapper)

The CloseIo API Wrapper is a package that allows you to access in an object oriented way the Close.io REST APIs and fetch or create data.

Archived!
---------

[](#archived)

Unfortunately as most of the original developers on this project are no longer with Loopline, or dealing with close.io we've taken the decision to archive it. This way it should be clear that the repository is not being maintained. For anyone who is interested in maintaining it please fork away and we wish you good luck!

If you want a bit more info on the decision to archive it you can see [\#122](https://github.com/loopline-systems/closeio-api-wrapper/issues/122)

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

[](#installation)

To install the library you will need to be using [Composer](https://github.com/composer/composer)in your project. To install it please see the [official docs](https://getcomposer.org/download/). CloseIo Api Wrapper uses Httplug to not be tied to any specific library that sends HTTP messages. This means that users are free to choose whichever PSR-7 implementation and HTTP client they want, be it Guzzle or a simple cURL client.

If you just want to get started quickly you should run the following command:

`composer require loopline-systems/closeio-api-wrapper php-http/curl-client nyholm/psr7`

This will install the library itself along with an HTTP client adapter for Httplug that uses cURL and a PSR-7 implementation needed to create the messages. You do not need to use those packages if you don't want to: you may use any package that provides [php-http/async-client-implementation](https://packagist.org/providers/php-http/async-client-implementation)and [http-message-implementation](https://packagist.org/providers/psr/http-message-implementation).

Usage
-----

[](#usage)

To get started you just need to create an instance of the client and then use its method to query the REST APIs of Close.io.

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

use LooplineSystems\CloseIoApiWrapper\Client;
use LooplineSystems\CloseIoApiWrapper\CloseIoApiWrapper;
use LooplineSystems\CloseIoApiWrapper\Configuration;

$configuration = new Configuration('{api-key}');
$client = new Client($configuration);
$closeIoApiWrapper = new CloseIoApiWrapper($client);

$leadsApi = $closeIoApiWrapper->getLeadApi();

// create lead
$lead = new Lead();
$lead->setName('Test Company');
$lead->setDescription('Company description');
$lead->setUrl('www.test-company.com');

// address
$address = new Address();
$address->setCountry('DE');
$address->setCity('Berlin');
$address->setAddress1('Main Street');
$address->setAddress2('Mitte');

// contacts
$contact = new Contact();
$contact->setName('Testy Testersson');
$contact->setTitle('Chief Tester');

// emails
$email = new Email();
$email->setEmail('testy-testersson@test-company.com');
$email->setType(Email::EMAIL_TYPE_OFFICE);
$contact->addEmail($email);

// phones
$phone = new Phone();
$phone->setPhone('+491234567890');
$phone->setType(Phone::PHONE_TYPE_MOBILE);
$contact->addPhone($phone);

$lead->addAddress($address);
$lead->addContact($contact);

$response = $leadsApi->addLead($lead);
```

Adding Opportunities
--------------------

[](#adding-opportunities)

```
$opportunity = new Opportunity();
$opportunity->setValue(500);
$opportunity->setNote('My note on this opportunity');
$opportunity->setConfidence(85);
$opportunity->setValuePeriod(Opportunity::OPPORTUNITY_FREQUENCY_MONTHLY);

// you can use the leadApi to get ID for leads
$opportunity->setLeadId();

$opportunityApi = $this->apiWrapper->getOpportunityApi();
$result = $opportunityApi->addOpportunity($opportunity);
```

Activities
----------

[](#activities)

```
$activityApi = $this->apiWrapper->getActivityApi();
```

```
// SMS
$sms = new SmsActivity();
$sms->setLocalPhone('12345');
$sms->setRemotePhone('23456');
$sms->setText('first sms');
$sms->setStatus(SmsActivity::STATUS_SCHEDULED);

$activityApi->addSms($sms);
```

```
// EMails
$email = new EmailActivity();
$email->setStatus(EmailActivity::STATUS_INBOX);
$email->setSubject('RE: Support');
$email->setSender('Support ');
$email->setTo('Customer ');

$activityApi->addEmail($sms);
```

Updating custom fields
----------------------

[](#updating-custom-fields)

```
$customField = new CustomField();
$customField->setId('Custom field id')
$customField->addChoice('Value for choices list');

$customFieldApi = $this->apiWrapper->getCustomFieldApi();
$result = $customFieldApi->updateCustomField($customField);
```

Info
----

[](#info)

Right now just a few APIs are implemented, because the main need was to create leads. Feel free to add requests and create pull requests or go on forking the repository.

We use  for our release names, so don't worry they have no special meaning :)

Authors
-------

[](#authors)

Michael Devery -
Marco Roßdeutscher -
Marc Zahn -

See also the list of [contributors](https://github.com/loopline-systems/closeio-api-wrapper/contributors) who participated in this project.

License
-------

[](#license)

The Close.io API Wrapper is licensed under the MIT License: see the LICENSE file for more information.

*! We are not affiliated with Close.io itself.*

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance3

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Every ~103 days

Recently: every ~168 days

Total

14

Last Release

2832d ago

PHP version history (3 changes)0.0.1PHP &gt;=5.4.0

v0.1.1PHP ^5.6.0

v0.4.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e45af0cd02dce910bce81d846add2c36d03278cc76663af9ded7b91ebdeda4e?d=identicon)[michael.devery](/maintainers/michael.devery)

![](https://www.gravatar.com/avatar/31206920b228f7a42bfaffc3ba9ce428fc5332596f441a9b1523300837c2ed68?d=identicon)[marco.rossdeutscher](/maintainers/marco.rossdeutscher)

![](https://www.gravatar.com/avatar/1e849559a0812b71b97f9dbfaf2b48e97a3384f767893b84413965e779b45d68?d=identicon)[marczahnlls](/maintainers/marczahnlls)

---

Top Contributors

[![mavimo](https://avatars.githubusercontent.com/u/43941?v=4)](https://github.com/mavimo "mavimo (82 commits)")[![omissis](https://avatars.githubusercontent.com/u/197604?v=4)](https://github.com/omissis "omissis (21 commits)")[![ste93cry](https://avatars.githubusercontent.com/u/1770485?v=4)](https://github.com/ste93cry "ste93cry (19 commits)")[![marczahn](https://avatars.githubusercontent.com/u/908347?v=4)](https://github.com/marczahn "marczahn (10 commits)")[![mickadoo](https://avatars.githubusercontent.com/u/6374064?v=4)](https://github.com/mickadoo "mickadoo (9 commits)")[![wridgers](https://avatars.githubusercontent.com/u/235730?v=4)](https://github.com/wridgers "wridgers (5 commits)")[![dlimars](https://avatars.githubusercontent.com/u/4266198?v=4)](https://github.com/dlimars "dlimars (5 commits)")[![danbarker](https://avatars.githubusercontent.com/u/1181564?v=4)](https://github.com/danbarker "danbarker (4 commits)")[![AlbertoBarba](https://avatars.githubusercontent.com/u/16882595?v=4)](https://github.com/AlbertoBarba "AlbertoBarba (4 commits)")[![EnoahNetzach](https://avatars.githubusercontent.com/u/663755?v=4)](https://github.com/EnoahNetzach "EnoahNetzach (2 commits)")[![kasparsj](https://avatars.githubusercontent.com/u/743481?v=4)](https://github.com/kasparsj "kasparsj (2 commits)")[![rvitaliy](https://avatars.githubusercontent.com/u/1823711?v=4)](https://github.com/rvitaliy "rvitaliy (2 commits)")[![wodka](https://avatars.githubusercontent.com/u/385731?v=4)](https://github.com/wodka "wodka (2 commits)")[![DaneEveritt](https://avatars.githubusercontent.com/u/418376?v=4)](https://github.com/DaneEveritt "DaneEveritt (2 commits)")[![filchakov](https://avatars.githubusercontent.com/u/2973867?v=4)](https://github.com/filchakov "filchakov (2 commits)")[![eengoron](https://avatars.githubusercontent.com/u/2817521?v=4)](https://github.com/eengoron "eengoron (1 commits)")

---

Tags

closeio php wrapper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/loopline-systems-closeio-api-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/loopline-systems-closeio-api-wrapper/health.svg)](https://phpackages.com/packages/loopline-systems-closeio-api-wrapper)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[jane-php/jane-php

All jane libraries into one repository

678254.7k4](/packages/jane-php-jane-php)[knplabs/packagist-api

Packagist API client.

1821.3M34](/packages/knplabs-packagist-api)[slince/shopify-api-php

Shopify API Client for PHP

131236.9k1](/packages/slince-shopify-api-php)[goetas-webservices/soap-client

17541.5k5](/packages/goetas-webservices-soap-client)[paknahad/jsonapi-bundle

The jsonapi-bundle is a Symfony bundle. it is the fastest way to generate API based on JsonApi.org using woohoolabs/yin

7155.8k4](/packages/paknahad-jsonapi-bundle)

PHPackages © 2026

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