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

ActiveLibrary[API Development](/categories/api)

bandwidth/iris
==============

Bandwidth's Iris SDK for PHP

v4.4.0(5mo ago)12690.6k↓68.5%23[1 issues](https://github.com/Bandwidth/php-bandwidth-iris/issues)1MITPHPPHP &gt;=7.2CI passing

Since Aug 10Pushed 3mo ago12 watchersCompare

[ Source](https://github.com/Bandwidth/php-bandwidth-iris)[ Packagist](https://packagist.org/packages/bandwidth/iris)[ Docs](http://dev.bandwidth.com)[ RSS](/packages/bandwidth-iris/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (44)Used By (1)

PHP Client library for Bandwidth's Phone Number Dashboard (AKA: Dashboard, Iris)
================================================================================

[](#php-client-library-for-bandwidths-phone-number-dashboard-aka-dashboard-iris)

[![Build Status](https://camo.githubusercontent.com/adfb77aeed601c84061ced22be37b7c3423dcd4e698add20983d235ed14105b7/68747470733a2f2f7472617669732d63692e6f72672f42616e6477696474682f7068702d62616e6477696474682d697269732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Bandwidth/php-bandwidth-iris)

Supported PHP Versions
----------------------

[](#supported-php-versions)

VersionSupported?8.0Supported8.1Supported8.2Supported8.3Supported8.4SupportedInstall
-------

[](#install)

Run

```
composer require bandwidth/iris
```

Usage
-----

[](#usage)

```
// Basic Auth
$client = new \Iris\Client($login, $password, ['url' => 'https://dashboard.bandwidth.com/api/']);

// Bearer Auth with Token
$client = new \Iris\Client(null, null, ['accessToken' => '']);

// Bearer Auth using Client Credentials
$client = new \Iris\Client(null, null, ['clientId' => '', 'clientSecret' => '']);
```

Run tests
---------

[](#run-tests)

```
composer install
php ./bin/phpunit --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');
```

#### PortIn File Management: Grab filename

[](#portin-file-management-grab-filename)

```
$response = $portin->loas_send('./hello.txt', array("Content-Type" => "text/plain"));
$tmp = explode("/", $response);
$id = end($tmp);
print_r($id);
```

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();
```

Billing reports
---------------

[](#billing-reports)

### Listing all Billing Report instances

[](#listing-all-billing-report-instances)

```
$billingReports = $account->billingreports()->getList();
```

### Request new billing report

[](#request-new-billing-report)

```
$billingReport = $account->billingreports()->request(
    array("Type" => "bdr",
        "DateRange" => array(
            "StartDate" => "2018-02-05",
            "EndDate" => "2018-02-06",
    )));
```

### Checking status of the billing report

[](#checking-status-of-the-billing-report)

```
$billingReport = $account->billingreports()->billingreport('a12b456c8-abcd-1a3b-a1b2-0a2b4c6d8e0f2');
```

### Download zip with content of the billing report

[](#download-zip-with-content-of-the-billing-report)

```
$zipStream = $billingReport->file();
```

### Download zip with content of the billing report and save to file

[](#download-zip-with-content-of-the-billing-report-and-save-to-file)

```
$outFile = '/tmp/report.zip';
$billingReport->file(['stream' => true, 'sink' => $outFile]);
```

TN Options
----------

[](#tn-options)

### Get TN Option Orders

[](#get-tn-option-orders)

```
$tnoptions = $account->tnoptions();
$response = $tnoptions->getList();
print_r($response[0]->OrderId);
```

### GET TN Option Order

[](#get-tn-option-order)

```
$tnoptions = $account->tnoptions();
$response = $tnoptions->tnoption("order_id");
print_r($response->OrderCreateDate);
```

### Get TN Option Order (error)

[](#get-tn-option-order-error)

```
$tnoptions = $account->tnoptions();
$response = $tnoptions->tnoption("error_order_id");
print_r($response->ErrorList->Error->Description); //note: Error could be an array or a single object
//depending on how many errors are returned
```

### Create Portout Passcode

[](#create-portout-passcode)

```
$tnoptions = $account->tnoptions();
$data = array(
    "TnOptionGroups" => array(
        "TnOptionGroup" => array(
            "PortOutPasscode" => "12abd38",
            "TelephoneNumbers" => array(
                "TelephoneNumber" => "2018551020"
            )
        ),
    )
);
$response = $tnoptions->create($data);
print_r($response->OrderCreateDate);
```

### Create Call Forward Number

[](#create-call-forward-number)

```
$tnoptions = $account->tnoptions();
$data = array(
    "TnOptionGroups" => array(
        "TnOptionGroup" => array(
            "CallForward" => "2018551022",
            "TelephoneNumbers" => array(
                "TelephoneNumber" => "2018551020"
            )
        ),
    )
);
$response = $tnoptions->create($data);
print_r($response->OrderCreateDate);
```

### Enable SMS

[](#enable-sms)

```
$tnoptions = $account->tnoptions();
$data = array(
    "TnOptionGroups" => array(
        "TnOptionGroup" => array(
            "Sms" => "on",
            "TelephoneNumbers" => array(
                "TelephoneNumber" => "2018551020"
            )
        ),
    )
);
$response = $tnoptions->create($data);
print_r($response->OrderCreateDate);
```

Hosted Messaging Functions
--------------------------

[](#hosted-messaging-functions)

### Get Import TN Orders

[](#get-import-tn-orders)

```
$resp = $account->getImportTnOrders(array(
    "createdDateFrom" => "2013-10-22T00:00:00.000Z",
    "createdDateTo" => "2013-10-25T00:00:00.000Z"
));

print_r($resp->ImportTnOrderSummary[0]->OrderId);
```

### Create Import TN Order

[](#create-import-tn-order)

```
$importTnOrder = new \Iris\ImportTnOrder(array(
    "CustomerOrderId" => "id",
    "TelephoneNumbers" => array(
        "TelephoneNumber" => array("5554443333")
    ),
    "SiteId" => "12345",
    "Subscriber" => array(
        "Name" => "Company INC",
        "ServiceAddress" => array(
            "HouseNumber" => "1",
            "StreetName" => "Street",
            "City" => "City",
            "StateCode" => "XY",
            "Zip" => "54345",
            "County" => "County"
        )
    ),
    "LoaAuthorizingPerson" => "Test Person"
));

print_r($account->createImportTnOrder($importTnOrder)->ImportTnOrder->OrderId);
```

### Get Import TN Order By ID

[](#get-import-tn-order-by-id)

```
print_r($account->getImportTnOrder("some_id_value")->ProcessingStatus);
```

### Get Import TN Order History

[](#get-import-tn-order-history)

```
print_r($account->getImportTnOrderHistory("some_id_value")->OrderHistory[0]->Status);
```

### Get Import TN Order LOAs

[](#get-import-tn-order-loas)

```
$response = $account->getImportTnOrderLoas("order_id");
print_r($response->resultMessage);
echo "\n";
print_r($response->fileNames); //this can be a single string (if there's 1 file) or an array of strings (if there's multiple files)
```

### Upload LOA file for an Import TN Order

[](#upload-loa-file-for-an-import-tn-order)

Valid `mime_types` can be found on the [Dashboard API Reference](https://dev.bandwidth.com/numbers/apiReference.html) under `/accounts /{accountId} /importTnOrders /{orderid} /loas`

Mime types are expected to be in the format `x/y`, such as `application/pdf` or `text/plain`

```
$account->uploadImportTnOrderLoaFile("order_id", "binary_file_contents", "mime_type");
```

```
$filename = "loa.pdf";
$file = fopen($filename, "rb") or die("Unable to open file");
$file_contents = fread($file, filesize($filename));
$account->uploadImportTnOrderLoaFile("order_id", $file_contents, "application/pdf");
fclose($file);
```

### Download LOA file for an Import TN Order (bonked. come back to this)

[](#download-loa-file-for-an-import-tn-order-bonked-come-back-to-this)

Note: Make sure to grab the desired file ID from the response of `$account->getImportTnOrderLoas($order_id)` in the field `$response->fileNames`

```
$response = $account->downloadImportTnOrderLoaFile("order_id", "file_id");
$file = fopen("write.pdf", "wb") or die("Unable to open file");
fwrite($file, $response);
fclose($file);
```

### Replace LOA file for an Import TN Order

[](#replace-loa-file-for-an-import-tn-order)

```
$account->replaceImportTnOrderLoaFile("order_id", "file_id", "binary_file_contents", "mime_type");
```

### Delete LOA file for an Import TN Order

[](#delete-loa-file-for-an-import-tn-order)

```
$account->deleteImportTnOrderLoaFile("order_id", "file_id");
```

### Get LOA file metadata for an Import TN Order

[](#get-loa-file-metadata-for-an-import-tn-order)

```
$response = $account->getImportTnOrderLoaFileMetadata("order_id", "file_id");
print_r($response->DocumentName);
echo "\n";
print_r($response->DocumentType);
```

### Update LOA file metadata for an Import TN Order

[](#update-loa-file-metadata-for-an-import-tn-order)

```
$file_metadata = new \Iris\FileMetaData(array(
    "DocumentName" => "Updated",
    "DocumentType" => "LOA"
));
$account->updateImportTnOrderLoaFileMetadata("order_id", "file_id", $file_metadata);
```

### Delete LOA file metadata for an Import TN Order

[](#delete-loa-file-metadata-for-an-import-tn-order)

```
$account->deleteImportTnOrderLoaFileMetadata("order_id", "file_id");
```

### Check TNs Portability

[](#check-tns-portability)

```
print_r($account->checkTnsPortability(array("5554443333", "5553334444"))->ImportTnCheckerPayload);
```

### Get In Service Numbers

[](#get-in-service-numbers)

```
print_r($account->getInserviceNumbers(array("areacode" => "919"))->TelephoneNumbers->Count);
```

### Check In Service Number

[](#check-in-service-number)

```
print_r($account->checkInserviceNumber("5554443333"));
```

### Get Remove Imported TN Orders

[](#get-remove-imported-tn-orders)

```
$resp = $account->getRemoveImportedTnOrders(array(
    "createdDateFrom" => "2013-10-22T00:00:00.000Z",
    "createdDateTo" => "2013-10-25T00:00:00.000Z"
));

print_r($resp->RemoveImportedTnOrderSummary[0]->OrderStatus);
```

### Create A Remove Imported TN Order

[](#create-a-remove-imported-tn-order)

```
$removeImportedTnOrder = new \Iris\RemoveImportedTnOrder(array(
    "CustomerOrderId" => "custom string",
    "TelephoneNumbers" => array(
        "TelephoneNumber" => array("5554443333", "5553332222")
    )
));

print_r($account->createRemoveImportedTnOrder($removeImportedTnOrder)->Location);
```

### Get Removed Imported TN Order

[](#get-removed-imported-tn-order)

```
print_r($account->getRemoveImportedTnOrder("some_id_value")->ProcessingStatus);
```

### Get Removed Imported TN Order History

[](#get-removed-imported-tn-order-history)

```
print_r($account->getRemoveImportedTnOrderHistory("some_id_value")->OrderHistory[0]->Status);
```

CSR
---

[](#csr)

### Create CSR Order

[](#create-csr-order)

```
$csrOrder = new \Iris\Csr(array(
    "CustomerOrderId" => "order id",
    "WorkingOrBillingTelephoneNumber" => "5554443333"
));

$response = $account->createCsrOrder($csrOrder);
print_r($response->OrderId);
```

### Replace CSR Order

[](#replace-csr-order)

```
$csrOrder = new \Iris\Csr(array(
    "CustomerOrderId" => "order id",
    "WorkingOrBillingTelephoneNumber" => "5554443333"
));

$response = $account->replaceCsrOrder("order_id", $csrOrder);
print_r($response->OrderId);
```

### Get CSR Order

[](#get-csr-order)

```
$response = $account->getCsrOrder("order_id");
print_r($response->OrderId);
```

### Get CSR Order Notes

[](#get-csr-order-notes)

```
$response = $account->getCsrOrderNotes("order_id");
print_r($response->Note[0]->Description);
```

### Add CSR Order Note

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

```
$note = new \Iris\CsrNote(array(
    "UserId" => "id",
    "Description" => "description"
));

$account->addNoteToCsr("order_id", $note);
```

### Update CSR Order Note

[](#update-csr-order-note)

```
$note = new \Iris\CsrNote(array(
    "UserId" => "id",
    "Description" => "description"
));

$account->updateCsrOrderNote("order_id", "note_id", $note);
```

Emergency Notification Recipients
---------------------------------

[](#emergency-notification-recipients)

### Create Emergency Notification Recipient

[](#create-emergency-notification-recipient)

```
$data = array(
  "Description" => "Email to Bldg. 3 Front Desk",
  "Type" => "EMAIL",
  "EmailAddress" => "foo@bar.com"
);
$response = $account->createEmergencyNotificationRecipient($data);
```

### Get Emergency Notification Recipients

[](#get-emergency-notification-recipients)

```
$response = $account->getEmergencyNotificationRecipients();
```

### Get Emergency Notification Recipient

[](#get-emergency-notification-recipient)

```
$response = $account->getEmergencyNotificationRecipient("id");
```

### Replace Emergency Notification Recipient

[](#replace-emergency-notification-recipient)

```
$data = array(
  "Description" => "Email to Bldg. 3 Front Desk",
  "Type" => "EMAIL",
  "EmailAddress" => "foo@bar.com"
);
$response = $account->replaceEmergencyNotificationRecipient("id", $data);
```

### Delete Emergency Notification Recipient

[](#delete-emergency-notification-recipient)

```
$account->deleteEmergencyNotificationRecipient("id");
```

Emergeny Notification Group
---------------------------

[](#emergeny-notification-group)

### Create Emergency Notification Group Order

[](#create-emergency-notification-group-order)

```
$data = array(
  "CustomerOrderId" => "value",
  "AddedEmergenyNotificationGroup" => array(
    "EmergencyNotificationRecipient" => array(
      "Identifier" => "123"
    )
  )
);
$response = $account->createEmergencyNotificationGroupOrder($data);
```

### Get Emergency Notification Group Orders

[](#get-emergency-notification-group-orders)

```
$response = $account->getEmergencyNotificationGroupOrders();
```

### Get Emergency Notification Group Order

[](#get-emergency-notification-group-order)

```
$response = $account->getEmergencyNotificationGroupOrder("id");
```

### Get Emergency Notification Groups

[](#get-emergency-notification-groups)

```
$response = $account->getEmergencyNotificationGroups();
```

### Get Emergency Notification Group

[](#get-emergency-notification-group)

```
$response = $account->getEmergencyNotificationGroup("id");
```

Emergency Notification Endpoint
-------------------------------

[](#emergency-notification-endpoint)

### Create Emergency Notification Endpoint Order

[](#create-emergency-notification-endpoint-order)

```
$data = array(
  "CustomerOrderId" => "123",
  "EmergencyNotificationEndpointAssociations" => array(
    "EmergenyNotificationGroup" => array(
      "Identifier" => "456"
    )
  )
);
$response = $account->createEmergencyNotificationEndpointOrder($data);
```

### Get Emergency Notification Endpoint Orders

[](#get-emergency-notification-endpoint-orders)

```
$response = $account->getEmergencyNotificationEndpointOrders();
```

### Get Emergency Notification Endpoint Order

[](#get-emergency-notification-endpoint-order)

```
$response = $account->getEmergencyNotificationEndpointOrder("id");
```

Alternate End User Identiy
--------------------------

[](#alternate-end-user-identiy)

### Get Alternate End User Information

[](#get-alternate-end-user-information)

```
$response = $account->getAlternateEndUserInformation();
```

### Get Alternate Caller Information

[](#get-alternate-caller-information)

```
$response = $account->getAlternateCallerInformation("id");
```

Application Management
----------------------

[](#application-management)

### Get Applications

[](#get-applications)

```
$response = $account->getApplications();
print_r($response);
```

### Get Application

[](#get-application)

```
$response = $account->getApplication("id");
print_r($response);
```

### Create Application

[](#create-application)

```
$data = array(
    'ServiceType' => 'Messaging-V2',
    'AppName' => 'sample',
    'MsgCallbackUrl' => 'https://test.com'
);
$response = $account->createApplication($data);
print_r($response);
```

### Update Application

[](#update-application)

```
$data = array(
    'ServiceType' => 'Messaging-V2',
    'AppName' => 'sample',
    'MsgCallbackUrl' => 'https://test2.com'
);
$response = $account->updateApplication("id", $data);
print_r($response);
```

### Delete Application

[](#delete-application)

```
$account->deleteApplication("id");
```

### Get Application SipPeers

[](#get-application-sippeers)

```
$response = $account->getApplicationSippeers("id");
print_r($response);
```

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance77

Regular maintenance activity

Popularity47

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity71

Established project with proven stability

 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 ~77 days

Recently: every ~184 days

Total

41

Last Release

150d ago

Major Versions

v1.3.1 → v2.0.02019-07-15

v2.5.3 → v3.0.02020-09-09

v3.4.0 → v4.0.02022-04-27

PHP version history (2 changes)v1.0.0PHP &gt;=5.5

v3.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f43cdd86ffc3b99618ba7def4ec2dab368296b1e67f9436f33ce250bdb98725?d=identicon)[dtolb](/maintainers/dtolb)

![](https://www.gravatar.com/avatar/dcb348547ff8f4704d77b280ed559903a463e9254e9934cf6bc2c167bdd5d093?d=identicon)[DX-Bandwidth](/maintainers/DX-Bandwidth)

---

Top Contributors

[![jmulford-bw](https://avatars.githubusercontent.com/u/39915377?v=4)](https://github.com/jmulford-bw "jmulford-bw (64 commits)")[![ajrice6713](https://avatars.githubusercontent.com/u/53190766?v=4)](https://github.com/ajrice6713 "ajrice6713 (20 commits)")[![pashamesh](https://avatars.githubusercontent.com/u/1695806?v=4)](https://github.com/pashamesh "pashamesh (15 commits)")[![brianluisgomez](https://avatars.githubusercontent.com/u/3445445?v=4)](https://github.com/brianluisgomez "brianluisgomez (13 commits)")[![ckoegel](https://avatars.githubusercontent.com/u/53310569?v=4)](https://github.com/ckoegel "ckoegel (8 commits)")[![jgutierrezglez](https://avatars.githubusercontent.com/u/83696425?v=4)](https://github.com/jgutierrezglez "jgutierrezglez (5 commits)")[![tm1000](https://avatars.githubusercontent.com/u/564256?v=4)](https://github.com/tm1000 "tm1000 (4 commits)")[![ooglek](https://avatars.githubusercontent.com/u/100755?v=4)](https://github.com/ooglek "ooglek (3 commits)")[![scottbarstow](https://avatars.githubusercontent.com/u/746403?v=4)](https://github.com/scottbarstow "scottbarstow (3 commits)")[![troft](https://avatars.githubusercontent.com/u/14334178?v=4)](https://github.com/troft "troft (2 commits)")[![fogeytron](https://avatars.githubusercontent.com/u/808150?v=4)](https://github.com/fogeytron "fogeytron (2 commits)")[![jkgibbs](https://avatars.githubusercontent.com/u/37124778?v=4)](https://github.com/jkgibbs "jkgibbs (1 commits)")[![bwdan](https://avatars.githubusercontent.com/u/38324483?v=4)](https://github.com/bwdan "bwdan (1 commits)")[![cwmiller](https://avatars.githubusercontent.com/u/3728286?v=4)](https://github.com/cwmiller "cwmiller (1 commits)")[![gdraque](https://avatars.githubusercontent.com/u/2540832?v=4)](https://github.com/gdraque "gdraque (1 commits)")[![06chaynes](https://avatars.githubusercontent.com/u/612378?v=4)](https://github.com/06chaynes "06chaynes (1 commits)")[![re8260](https://avatars.githubusercontent.com/u/18328936?v=4)](https://github.com/re8260 "re8260 (1 commits)")[![snellingio](https://avatars.githubusercontent.com/u/9887585?v=4)](https://github.com/snellingio "snellingio (1 commits)")

---

Tags

bandwidthcpaasportinsdksip-peerssip-trunkingtnsphpsdkiris

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[openai-php/laravel

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

3.7k9.5M89](/packages/openai-php-laravel)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[php-opencloud/openstack

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

2312.4M25](/packages/php-opencloud-openstack)

PHPackages © 2026

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