PHPackages                             bandwidth-temp/iris - 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. bandwidth-temp/iris

ActiveLibrary[API Development](/categories/api)

bandwidth-temp/iris
===================

Bandwidth's Iris SDK for PHP

v0.0.9(10y ago)08.7kMITPHPPHP &gt;=5.3.0

Since Jun 23Pushed 10y ago2 watchersCompare

[ Source](https://github.com/scottbarstow/iris-php)[ Packagist](https://packagist.org/packages/bandwidth-temp/iris)[ Docs](http://www.bandwidth.com)[ RSS](/packages/bandwidth-temp-iris/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (10)Used By (0)

PHP Client library for IRIS / BBS API
=====================================

[](#php-client-library-for-iris--bbs-api)

Install
-------

[](#install)

Run

```
composer require bandwidth/iris
```

Usage
-----

[](#usage)

```
$client = new \Iris\Client($login, $password, ['url' => 'https://api.inetwork.com/v1.0/']);
```

Run tests
---------

[](#run-tests)

```
$ composer install
$ php phpunit.phar --bootstrap ./vendor/autoload.php tests/
```

=======

Examples
--------

[](#examples)

There is an 'examples' folder in the source tree that shows how each of the API objects work with simple example code. To run the examples:

```
$ cd examples
$ composer install
$ cp config.php.example config.php
```

Edit the config.php to match your IRIS credentials and run the examples individually. e.g.

```
php availableNumbers-sample.php
```

If the examples take command line parameters, you will get the usage by just executing the individual script.

API Objects
-----------

[](#api-objects)

### General principles

[](#general-principles)

In most cases you should use Account object as start point.

```
$account = new \Iris\Account($your_account_id, $client);
```

Account has related entities such Orders, Sites, etc.

Example:

```
$sites = $account->sites();
```

To get stored Sites you should create $sites object and execute get() method.

```
$items = $sites->getList(); // Array(Site1, Site2)
```

To reflect object structure:

```
echo json_encode($site->to_array());
```

Available Numbers
-----------------

[](#available-numbers)

```
$account->availableNumbers([ "areaCode" => "818" ]);
```

Available NpaNxx
----------------

[](#available-npanxx)

```
$account->availableNpaNxx(["state" => "CA"]);
```

Cities
------

[](#cities)

```
$cities = new \Iris\Cities($client);
$items = $cities->getList(["state" => "NC"]);
```

Covered Rate Centers
--------------------

[](#covered-rate-centers)

```
$rcs = new Iris\CoveredRateCenters($client);
$rateCenters = $rcs->getList(["page" => 1, "size" => 10 ]);
```

Disconnected Numbers
--------------------

[](#disconnected-numbers)

```
$account->disnumbers(["areaCode" => "919"]);
```

Disconnect Numbers
------------------

[](#disconnect-numbers)

The Disconnect object is used to disconnect numbers from an account. Creates a disconnect order that can be tracked

### Create Disconnect

[](#create-disconnect)

```
$disconnect = $account->disconnects()->create([
    "name" => "test disconnect order 4",
    "CustomerOrderId" => "Disconnect1234",
    "DisconnectTelephoneNumberOrderType" => [
        "TelephoneNumberList" => [
            "TelephoneNumber" => [ "9192755378", "9192755703" ]
        ]
    ]
]]);
```

### Get Disconnect

[](#get-disconnect)

```
$disconnect = $account->disconnects()->disconnect("b902dee1-0585-4258-becd-5c7e51ccf5e1", true); // tnDetails: true
```

### Add Note to Disconnect

[](#add-note-to-disconnect)

```
$disconnect->notes()->create([ "UserId" => "byo_dev", "Description" => "Test Note"]);
```

### Get Notes for Disconnect

[](#get-notes-for-disconnect)

```
$items = $disconnect->notes()->getList();
```

Dlda
----

[](#dlda)

### Create Ddla

[](#create-ddla)

```
$order_data = [
    "CustomerOrderId" => "123",
    "DldaTnGroups" => [
        "DldaTnGroup" => [
            [
                "TelephoneNumbers" => [
                    "TelephoneNumber" => "4352154856"
                ],
                "AccountType" => "RESIDENTIAL",
                "ListingType" => "LISTED",
                "ListAddress" => "true",
                "ListingName" => [
                    "FirstName" => "FirstName",
                    "FirstName2" => "FirstName2",
                    "LastName" => "LastName",
                    "Designation" => "Designation",
                    "TitleOfLineage" => "TitleOfLineage",
                    "TitleOfAddress" => "TitleOfAddress",
                    "TitleOfAddress2" => "TitleOfAddress2",
                    "TitleOfLineageName2" => "TitleOfLineageName2",
                    "TitleOfAddressName2" => "TitleOfAddressName2",
                    "TitleOfAddress2Name2" => "TitleOfAddress2Name2",
                    "PlaceListingAs" => "PlaceListingAs",
                ],
                "Address" => [
                    "HousePrefix" => "HousePrefix",
                    "HouseNumber" => "915",
                    "HouseSuffix" => "HouseSuffix",
                    "PreDirectional" => "PreDirectional",
                    "StreetName" => "StreetName",
                    "StreetSuffix" => "StreetSuffix",
                    "PostDirectional" => "PostDirectional",
                    "AddressLine2" => "AddressLine2",
                    "City" => "City",
                    "StateCode" => "StateCode",
                    "Zip" => "Zip",
                    "PlusFour" => "PlusFour",
                    "Country" => "Country",
                    "AddressType" => "AddressType"
                ]
            ]
        ]
    ]
];

$dlda = $account->dldas()->create($order_data);
```

### Get Dlda

[](#get-dlda)

```
$dlda = $account->dldas()->dlda("7802373f-4f52-4387-bdd1-c5b74833d6e2");
```

### Get Dlda History

[](#get-dlda-history)

```
$dlda->history();
```

### List Dldas

[](#list-dldas)

```
$account->dldas()->getList(["telephoneNumber" => "9195551212"]);
```

In Service Numbers
------------------

[](#in-service-numbers)

### List InService Numbers

[](#list-inservice-numbers)

```
$account->inserviceNumbers(["areaCode" => "919"]);
```

Lidb
----

[](#lidb)

### Create

[](#create)

```
$order_data = [
    "LidbTnGroups" => [
        "LidbTnGroup" => [
            [
                "TelephoneNumbers" => [
                    "TelephoneNumber" => "4352154856"
                ],
                "SubscriberInformation" => "Steve",
                "UseType" => "RESIDENTIAL",
                "Visibility" => "PUBLIC"
            ],
            [
                "TelephoneNumbers" => [
                    "TelephoneNumber" => "4352154855"
                ],
                "SubscriberInformation" => "Steve",
                "UseType" => "RESIDENTIAL",
                "Visibility" => "PUBLIC"
            ]
        ]
    ]
];

$lidb = $account->lidbs()->create($order_data);
```

### Get Lidb

[](#get-lidb)

```
$lidb = $account->lidbs()->lidb("7802373f-4f52-4387-bdd1-c5b74833d6e2");
```

### List Lidbs

[](#list-lidbs)

```
$lidbs = $account->lidbs()->getList(["lastModifiedAfter" => "mm-dd-yy", "telephoneNumber"=> "888"]);
```

LNP Checker
-----------

[](#lnp-checker)

### Check LNP

[](#check-lnp)

```
$account->lnpChecker(["4109255199", "9196190594"], "true");
```

Orders
------

[](#orders)

### Create Order

[](#create-order)

```
$order = $account->orders()->create([
    "Name" => "Available Telephone Number order",
    "SiteId" => "2297",
    "CustomerOrderId" => "123456789",
    "ExistingTelephoneNumberOrderType" => [
        "TelephoneNumberList" => [
            "TelephoneNumber" => [ "9193752369", "9193752720", "9193752648"]
        ]
    ]
]);
```

### Get Order

[](#get-order)

```
$response = $account->orders()->order("f30a31a1-1de4-4939-b094-4521bbe5c8df", true); // tndetail=true
$order = $response->Order;
```

### List Orders

[](#list-orders)

```
$items = $account->orders()->getList();
```

### Add note to order

[](#add-note-to-order)

```
$order->notes()->create([ "UserId" => "byo_dev", "Description" => "Test Note"]);
```

### Get all Tns for an order

[](#get-all-tns-for-an-order)

```
$order->tns()->getList();
```

Port Ins
--------

[](#port-ins)

### Create PortIn

[](#create-portin)

```
$portin = $account->portins()->create(array(
    "BillingTelephoneNumber" => "6882015002",
    "Subscriber" => array(
        "SubscriberType" => "BUSINESS",
        "BusinessName" => "Acme Corporation",
        "ServiceAddress" => array(
            "HouseNumber" => "1623",
            "StreetName" => "Brockton Ave",
            "City" => "Los Angeles",
            "StateCode" => "CA",
            "Zip" => "90025",
            "Country" => "USA"
        )
    ),
    "LoaAuthorizingPerson" => "John Doe",
    "ListOfPhoneNumbers" => array(
        "PhoneNumber" => array("9882015025", "9882015026")
    ),
    "SiteId" => "365",
    "Triggered" => "false"
));
```

Get PortIn
----------

[](#get-portin)

```
$portin = $account->portins()->portin("d28b36f7-fa96-49eb-9556-a40fca49f7c6"));
```

List PortIns
------------

[](#list-portins)

```
$portins = $account->portins()->getList(["pon" => "a pon" ]);
```

### PortIn Instance methods

[](#portin-instance-methods)

```
$portin->update();
$portin->delete();
$portin->get_activation_status();
$status = $portin->set_activation_status([
    "AutoActivationDate" => "2014-08-30T18:30:00+03:00"
]);
$portin->history();
$portin->totals();
$portin->notes()->getList();
```

### PortIn File Management

[](#portin-file-management)

```
$portin->list_loas(true); // metadata = true
$portin->loas_send("./1.txt");
$portin->loas_update("./1.txt", "1.txt");
$portin->loas_delete("1.txt");
$portin->get_metadata("1.txt");
$meta_new = array(
    "DocumentName" => "text.txt",
    "DocumentType" => "INVOICE"
);
$portin->set_metadata('test.txt', $meta_new);
$portin->delete_metadata('test.txt');
```

Rate Centers
------------

[](#rate-centers)

### List Ratecenters

[](#list-ratecenters)

```
$rc = new \Iris\RateCenter($client);
$cities = $rc->getList(["state" => "CA", "available" => "true"]);
```

SIP Peers
---------

[](#sip-peers)

### Create SIP Peer

[](#create-sip-peer)

```
$sippeer = $account->sippeers()->create(array(
        "PeerName" => "Test5 Peer",
        "IsDefaultPeer" => false,
        "ShortMessagingProtocol" => "SMPP",
        "VoiceHosts" => array(
            "Host" => array(
                "HostName" => "192.168.181.90"
            )
        ),
        "SmsHosts" => array(
            "Host" => array(
                "HostName" => "192.168.181.90"
            )
        ),
        "TerminationHosts" => array(
            "TerminationHost" => array(
                "HostName" => "192.168.181.90",
                "Port" => 0,
                "CustomerTrafficAllowed" => "DOMESTIC",
                "DataAllowed" => true
            )
        )
));
```

### Get SIP Peer

[](#get-sip-peer)

```
$sippeer = $account->sippeers->sippeer("500651");
```

### List SIP Peers

[](#list-sip-peers)

```
$sippeers = $account->sippeers()->getList();
```

### Delete SIP Peer

[](#delete-sip-peer)

```
$sippeer->delete();
```

### Move TNs

[](#move-tns)

```
$sippeer->movetns([ "FullNumber" => [ "9192000046", "9192000047", "9192000048" ]]);
```

### Get TNs

[](#get-tns)

```
$tns = $sippeer->tns()->getList();
```

### Get TN

[](#get-tn)

```
$tn = $sippeer->tns()->tn("8183386251");
```

### Total TNs

[](#total-tns)

```
$count = $sippeer->totaltns();
```

### Set TN Options

[](#set-tn-options)

```
$sippeer->tns()->tn("8183386251")->set_tn_options([
    "FullNumber" => "8183386251",
    "CallForward" => "9194394706",
    "RewriteUser" => "JohnDoe",
    "NumberFormat" => "10digit",
    "RPIDFormat" => "e164"
]);
```

Sites
-----

[](#sites)

### Create A Site

[](#create-a-site)

```
$site = $account->sites()->create(
    array("Name" => "Test Site",
        "Address" => array(
            "City" => "Raleigh",
            "AddressType" => "Service",
            "HouseNumber" => "1",
            "StreetName" => "Avenue",
            "StateCode" => "NC"
    )));
```

### Updating a Site

[](#updating-a-site)

```
$site->Name = "New Name";
$site->update();
```

### Deleting a Site

[](#deleting-a-site)

```
$site->delete();
```

### Listing All Sites

[](#listing-all-sites)

```
$sites = $account->sites()->getList();
```

### Orders of a site

[](#orders-of-a-site)

```
$site->orders()->getList(["status" => "disabled"]);
```

### Total TNs of a site

[](#total-tns-of-a-site)

```
$site->totaltns();
```

### Portins of a site

[](#portins-of-a-site)

```
$site->portins()->getList(["status" => "disabled" ]);
```

### Sippeers

[](#sippeers)

```
$site->sippeers()->create([...])
```

\[see SIP Peers\]

Subscriptions
-------------

[](#subscriptions)

### Create Subscription

[](#create-subscription)

```
$subscription = $account->subscriptions()->create([
    "OrderType" => "portins",
    "OrderId" => "98939562-90b0-40e9-8335-5526432d9741",
    "EmailSubscription" => [
        "Email" => "test@test.com",
        "DigestRequested" => "DAILY"
    ]
]);
```

### Get Subscription

[](#get-subscription)

```
$subscription = $account->subscriptions()->subscription($id);
```

### List Subscriptions

[](#list-subscriptions)

```
$account->subscriptions()->getList(["orderType" => "portins"]);
```

### Update

[](#update)

```
$subscription->OrderType = "portins";
$subscription->update();
```

### DELETE

[](#delete)

```
$subscription->delete();
```

TNs
---

[](#tns)

### Get TN

[](#get-tn-1)

```
$tns = new Iris\Tns(null, $client);
$tn = $tns->tn($id);
```

### List TNs

[](#list-tns)

```
$tns = new Iris\Tns(null, $client);
$tns_items = $tns->getList(["page" => 1, "size" => 10 ]);
```

### TN Instance Methods

[](#tn-instance-methods)

```
$tn = $tns->tn("7576768750");
$site = $tn->site();
$sippeer = $tn->sippeer();
$tnreservation = $tn->tnreservation();
$tn->tndetails();
$rc = $tn->ratecenter();
$lata = $tn->lata();
$lca = $tn->lca();
```

TN Reservation
--------------

[](#tn-reservation)

### Create TN Reservation

[](#create-tn-reservation)

```
$resertation = $account->tnsreservations()->create(["ReservedTn" => "2512027430"]);
```

### Get TN Reservation

[](#get-tn-reservation)

```
$resertation = $account->tnsreservations()->tnsreservation("0099ff73-da96-4303-8a0a-00ff316c07aa");
```

### Delete TN Reservation

[](#delete-tn-reservation)

```
$resertation = $account->tnsreservations()->tnsreservation("0099ff73-da96-4303-8a0a-00ff316c07aa");
$resertation->delete();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~2 days

Total

9

Last Release

3966d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5db4e4f10c2980a4875e8f04034f2aa2e914ffd7fa95c62d5bcddf5b326d4e88?d=identicon)[selchenkov](/maintainers/selchenkov)

---

Top Contributors

[![scottbarstow](https://avatars.githubusercontent.com/u/746403?v=4)](https://github.com/scottbarstow "scottbarstow (3 commits)")

---

Tags

phpsdkiris

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bandwidth-temp-iris/health.svg)

```
[![Health](https://phpackages.com/badges/bandwidth-temp-iris/health.svg)](https://phpackages.com/packages/bandwidth-temp-iris)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

574.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

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