PHPackages                             codechito/php-client-sdk - 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. codechito/php-client-sdk

ActiveLibrary[API Development](/categories/api)

codechito/php-client-sdk
========================

PHP Client for using TransmitMessage's API.

05PHP

Since Jan 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/codechito/php-client-sdk)[ Packagist](https://packagist.org/packages/codechito/php-client-sdk)[ RSS](/packages/codechito-php-client-sdk/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Getting started
===============

[](#getting-started)

Specialty messaging services tailored towards your business

How to Build
------------

[](#how-to-build)

The generated code has dependencies over external libraries like UniRest. These dependencies are defined in the `composer.json` file that comes with the SDK. To resolve these dependencies, we use the Composer package manager which requires PHP greater than 5.3.2 installed in your system. Visit  to download the installer file for Composer and run it in your system. Open command prompt and type `composer --version`. This should display the current version of the Composer installed if the installation was successful.

- Using command line, navigate to the directory containing the generated files (including `composer.json`) for the SDK.
- Run the command `composer install`. This should install all the required dependencies and create the `vendor` directory in your project directory.

[![Building SDK - Step 1](https://camo.githubusercontent.com/119ece3879f15107c7ec27ac2df3506ffba67c898b00f2370347fd2533fa267b/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/119ece3879f15107c7ec27ac2df3506ffba67c898b00f2370347fd2533fa267b/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

### \[For Windows Users Only\] Configuring CURL Certificate Path in php.ini

[](#for-windows-users-only-configuring-curl-certificate-path-in-phpini)

CURL used to include a list of accepted CAs, but no longer bundles ANY CA certs. So by default it will reject all SSL certificates as unverifiable. You will have to get your CA's cert and point curl at it. The steps are as follows:

1. Download the certificate bundle (.pem file) from  on to your system.
2. Add curl.cainfo = "PATH\_TO/cacert.pem" to your php.ini file located in your php installation. “PATH\_TO” must be an absolute path containing the .pem file.

```
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =
```

How to Use
----------

[](#how-to-use)

The following section explains how to use the TransmitMessage library in a new project.

### 1. Open Project in an IDE

[](#1-open-project-in-an-ide)

Open an IDE for PHP like PhpStorm. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

[![Open project in PHPStorm - Step 1](https://camo.githubusercontent.com/6335f6e8deac86db294e9442c2f395cf71ebbcb4797356e152bc1c738f428967/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/6335f6e8deac86db294e9442c2f395cf71ebbcb4797356e152bc1c738f428967/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

Click on `Open` in PhpStorm to browse to your generated SDK directory and then click `OK`.

[![Open project in PHPStorm - Step 2](https://camo.githubusercontent.com/c1c160174dee49e36b11f6ed0f3115a4d97dc23b4903b1920798c24fa81091e5/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/c1c160174dee49e36b11f6ed0f3115a4d97dc23b4903b1920798c24fa81091e5/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

### 2. Add a new Test Project

[](#2-add-a-new-test-project)

Create a new directory by right clicking on the solution name as shown below:

[![Add a new project in PHPStorm - Step 1](https://camo.githubusercontent.com/f5cfb8bb066346f5f6d1480a0bdfbd98b5465b7c960c8421aa73fc655858b354/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/f5cfb8bb066346f5f6d1480a0bdfbd98b5465b7c960c8421aa73fc655858b354/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

Name the directory as "test"

[![Add a new project in PHPStorm - Step 2](https://camo.githubusercontent.com/2c87e5fa85e8c1625044db48470212174a96856a36934f9a83a86c4db496db4a/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d654469726563746f727926776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/2c87e5fa85e8c1625044db48470212174a96856a36934f9a83a86c4db496db4a/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d654469726563746f727926776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

Add a PHP file to this project

[![Add a new project in PHPStorm - Step 3](https://camo.githubusercontent.com/9251b0bcd7db2b6f80cb0afaa4ffe5481c59b348045bd2ff370cf7e9d6735a04/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d63726561746546696c6526776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/9251b0bcd7db2b6f80cb0afaa4ffe5481c59b348045bd2ff370cf7e9d6735a04/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d63726561746546696c6526776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

Name it "testSDK"

[![Add a new project in PHPStorm - Step 4](https://camo.githubusercontent.com/9318ac3e5ffb147b4f01bf5584bf0eda545c49a1da1f0657208da2e1fd12de1f/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d6546696c6526776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/9318ac3e5ffb147b4f01bf5584bf0eda545c49a1da1f0657208da2e1fd12de1f/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d6546696c6526776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

Depending on your project setup, you might need to include composer's autoloader in your PHP code to enable auto loading of classes.

```
require_once "../vendor/autoload.php";
```

It is important that the path inside require\_once correctly points to the file `autoload.php` inside the vendor directory created during dependency installations.

[![Add a new project in PHPStorm - Step 4](https://camo.githubusercontent.com/f24df1fc5d2bd0d516d14a9e640c738ff5ac8d72ac23eee49aeb882651b44c65/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/f24df1fc5d2bd0d516d14a9e640c738ff5ac8d72ac23eee49aeb882651b44c65/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

After this you can add code to initialize the client library and acquire the instance of a Controller class. Sample code to initialize the client library and using controller methods is given in the subsequent sections.

### 3. Run the Test Project

[](#3-run-the-test-project)

To run your project you must set the Interpreter for your project. Interpreter is the PHP engine installed on your computer.

Open `Settings` from `File` menu.

[![Run Test Project - Step 1](https://camo.githubusercontent.com/4fb6376a1f522bdf4fd163b7a14f162d34b04fae261eb3079626998819f47960/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/4fb6376a1f522bdf4fd163b7a14f162d34b04fae261eb3079626998819f47960/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

Select `PHP` from within `Languages & Frameworks`

[![Run Test Project - Step 2](https://camo.githubusercontent.com/4955da58baf9366d8383be05544f71c49ec01a22ee69b41fdc93a8318af2e227/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/4955da58baf9366d8383be05544f71c49ec01a22ee69b41fdc93a8318af2e227/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

Browse for Interpreters near the `Interpreter` option and choose your interpreter.

[![Run Test Project - Step 3](https://camo.githubusercontent.com/e1a9d6778567e7ec094cb879bd11894e27becbf20efa09d4cbc8766f47c2b897/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/e1a9d6778567e7ec094cb879bd11894e27becbf20efa09d4cbc8766f47c2b897/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

Once the interpreter is selected, click `OK`

[![Run Test Project - Step 4](https://camo.githubusercontent.com/97cc426193ae538abc59627d4fdf65f16b71e78d27c9d656133a1dd06e363431/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/97cc426193ae538abc59627d4fdf65f16b71e78d27c9d656133a1dd06e363431/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

To run your project, right click on your PHP file inside your Test project and click on `Run`

[![Run Test Project - Step 5](https://camo.githubusercontent.com/77f4e8b6a0d7e4dbc9886ecba5a303e4ab825b5a82aac7746a3218cd623eb99d/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)](https://camo.githubusercontent.com/77f4e8b6a0d7e4dbc9886ecba5a303e4ab825b5a82aac7746a3218cd623eb99d/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d5472616e736d69744d6573736167652d504850)

How to Test
-----------

[](#how-to-test)

Unit tests in this SDK can be run using PHPUnit.

1. First install the dependencies using composer including the `require-dev` dependencies.
2. Run `vendor\bin\phpunit --verbose` from commandline to execute tests. If you have installed PHPUnit globally, run tests using `phpunit --verbose` instead.

You can change the PHPUnit test configuration in the `phpunit.xml` file.

Initialization
--------------

[](#initialization)

### Authentication

[](#authentication)

In order to setup authentication and initialization of the API client, you need the following information.

ParameterDescriptionxApiKeyYour Api keyAPI client can be initialized as following.

```
$xApiKey = 'xApiKey'; // Your Api key

$client = new TransmitMessageLib\TransmitMessageClient($xApiKey);
```

Class Reference
===============

[](#class-reference)

List of Controllers
------------------------------------------------------------------

[](#list-of-controllers)

- [ContactsController](#contacts_controller)
- [AccountsController](#accounts_controller)
- [MMSController](#mms_controller)
- [SMSController](#sms_controller)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".ContactsController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) ContactsController
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-contactscontroller)

### Get singleton instance

[](#get-singleton-instance)

The singleton instance of the `ContactsController` class can be accessed from the API Client.

```
$contacts = $client->getContacts();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.getLists")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getLists

[](#-getlists)

> Get metadata of all contact lists defined in your account. Metadata includes list names and corresponding descriptions, contact count within each list, created/updated date and time of each list, filters applied on the list (if any) and type of list.

```
function getLists(
        $sort = 'updated_at',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters)

ParameterTagsDescriptionsort`Optional` `DefaultValue`Sort by (field name)filters`Optional`Filter by (relevant field values)page`Optional` `DefaultValue`The page number of the result to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage)

```
$sort = 'updated_at';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $contacts->getLists($sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.createList")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createList

[](#-createlist)

> Create a new (Static or Dynamic) contact list. NOTE: Filters are required only in case of a Dynamic List, and are not necessary for a Static List.

```
function createList($body)
```

#### Parameters

[](#parameters-1)

ParameterTagsDescriptionbody`Required`List details#### Example Usage

[](#example-usage-1)

```
$body = new ContactList();

$result = $contacts->createList($body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.deleteList")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteList

[](#-deletelist)

> Delete a contact list.

```
function deleteList($id)
```

#### Parameters

[](#parameters-2)

ParameterTagsDescriptionid`Required`List ID#### Example Usage

[](#example-usage-2)

```
$id = 'id';

$result = $contacts->deleteList($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.addListContacts")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) addListContacts

[](#-addlistcontacts)

> Add contacts into a static list. NOTE: This end point cannot be used to add contacts into a dynamic list.

```
function addListContacts(
        $id,
        $body)
```

#### Parameters

[](#parameters-3)

ParameterTagsDescriptionid`Required`Static List IDbody`Required`IDs of all contacts to be added to the list (max 100)#### Example Usage

[](#example-usage-3)

```
$id = 'id';
$body = new AddToContactList();

$result = $contacts->addListContacts($id, $body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.removeListContacts")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) removeListContacts

[](#-removelistcontacts)

> Remove contacts from a list. NOTE: This endpoint can be used to remove contacts only from a Static list.

```
function removeListContacts(
        $id,
        $body)
```

#### Parameters

[](#parameters-4)

ParameterTagsDescriptionid`Required`Static List IDbody`Required`IDs of all contacts to be removed from the list#### Example Usage

[](#example-usage-4)

```
$id = 'id';
$body = new AddToContactList();

$result = $contacts->removeListContacts($id, $body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.formatNumber")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) formatNumber

[](#-formatnumber)

> Format a valid mobile number from any format to an international format.

```
function formatNumber($body)
```

#### Parameters

[](#parameters-5)

ParameterTagsDescriptionbody`Required`Phone Number Object#### Example Usage

[](#example-usage-5)

```
$body = new PhoneNumber();

$result = $contacts->formatNumber($body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.getAList")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getAList

[](#-getalist)

> Get metadata for a selected contact list.

```
function getAList($iD)
```

#### Parameters

[](#parameters-6)

ParameterTagsDescriptioniD`Required`List ID#### Example Usage

[](#example-usage-6)

```
$iD = 'ID';

$result = $contacts->getAList($iD);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.removeContactField")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) removeContactField

[](#-removecontactfield)

> Delete a custom contact field

```
function removeContactField($id)
```

#### Parameters

[](#parameters-7)

ParameterTagsDescriptionid`Required`The custom contact field ID#### Example Usage

[](#example-usage-7)

```
$id = 'id';

$result = $contacts->removeContactField($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.updateContactField")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateContactField

[](#-updatecontactfield)

> Update contact field information

```
function updateContactField(
        $id,
        $body)
```

#### Parameters

[](#parameters-8)

ParameterTagsDescriptionid`Required`The custom contact field IDbody`Required`The custom contact field details (name, type etc.)#### Example Usage

[](#example-usage-8)

```
$id = 'id';
$body = new ContactField();

$result = $contacts->updateContactField($id, $body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.getContactFields")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getContactFields

[](#-getcontactfields)

> Get a list of custom contact fields and corresponding field details (name, type etc.)

```
function getContactFields()
```

#### Example Usage

[](#example-usage-9)

```
$result = $contacts->getContactFields();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.createContactField")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createContactField

[](#-createcontactfield)

> Create a custom contact field. Input additional relevant parameter values such as decimals for a numeric type field, or values for a list type field etc.

```
function createContactField($body)
```

#### Parameters

[](#parameters-9)

ParameterTagsDescriptionbody`Required`Contact field details#### Example Usage

[](#example-usage-10)

```
$body = new ContactField();

$result = $contacts->createContactField($body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.getListContacts")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getListContacts

[](#-getlistcontacts)

> Get information of contacts within a contact list.

```
function getListContacts(
        $id,
        $sort = 'updated_at',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-10)

ParameterTagsDescriptionid`Required`List IDsort`Optional` `DefaultValue`Sorted by (field name)filters`Optional` `Collection`Filter by (contact data). Applicable for Static Lists onlypage`Optional` `DefaultValue`The page of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-11)

```
$id = 'id';
$sort = 'updated_at';
$filters = array('filters');
$page = 0;
$limit = 25;

$result = $contacts->getListContacts($id, $sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.getContacts")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getContacts

[](#-getcontacts)

> Get information of all contacts in the TransmitMessage contacts database

```
function getContacts(
        $sort = 'updated_at',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-11)

ParameterTagsDescriptionsort`Optional` `DefaultValue`The output field to sort the results byfilters`Optional`Filter by (field values)page`Optional` `DefaultValue`The page number of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-12)

```
$sort = 'updated_at';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $contacts->getContacts($sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.getAContact")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getAContact

[](#-getacontact)

> Get information about a contact in your TransmitMessage contact database

```
function getAContact($id)
```

#### Parameters

[](#parameters-12)

ParameterTagsDescriptionid`Required`Contact Reference number#### Example Usage

[](#example-usage-13)

```
$id = 'id';

$result = $contacts->getAContact($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.createOrUpdateContact")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createOrUpdateContact

[](#-createorupdatecontact)

> Create a new contact or Update details of an existing contact

```
function createOrUpdateContact(
        $contactRef,
        $body)
```

#### Parameters

[](#parameters-13)

ParameterTagsDescriptioncontactRef`Required`Contact reference numberbody`Required`Contact details#### Example Usage

[](#example-usage-14)

```
$contactRef = 'contact_ref';
$body = new Contact();

$result = $contacts->createOrUpdateContact($contactRef, $body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ContactsController.removeAContact")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) removeAContact

[](#-removeacontact)

> Remove a contact record

```
function removeAContact($id)
```

#### Parameters

[](#parameters-14)

ParameterTagsDescriptionid`Required`Contact ID#### Example Usage

[](#example-usage-15)

```
$id = 'id';

$result = $contacts->removeAContact($id);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".AccountsController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) AccountsController
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-accountscontroller)

### Get singleton instance

[](#get-singleton-instance-1)

The singleton instance of the `AccountsController` class can be accessed from the API Client.

```
$accounts = $client->getAccounts();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".AccountsController.getAccountBalance")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getAccountBalance

[](#-getaccountbalance)

> Get Account Balance

```
function getAccountBalance()
```

#### Example Usage

[](#example-usage-16)

```
$result = $accounts->getAccountBalance();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".AccountsController.getSenderIds")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSenderIds

[](#-getsenderids)

> Get Sender Ids

```
function getSenderIds(
        $sort = 'name',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-15)

ParameterTagsDescriptionsort`Optional` `DefaultValue`Sort by (field name)filters`Optional`Filter results by (field value)page`Optional` `DefaultValue`The page number of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-17)

```
$sort = 'name';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $accounts->getSenderIds($sort, $filters, $page, $limit);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".MMSController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) MMSController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-mmscontroller)

### Get singleton instance

[](#get-singleton-instance-2)

The singleton instance of the `MMSController` class can be accessed from the API Client.

```
$mMS = $client->getMMS();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".MMSController.cancelMMSCampaign")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) cancelMMSCampaign

[](#-cancelmmscampaign)

> Cancel an MMS Campaign. NOTE: Can only cancel campaigns in SCHEDULED or VALIDATING status

```
function cancelMMSCampaign($id)
```

#### Parameters

[](#parameters-16)

ParameterTagsDescriptionid`Required`MMS Campaign ID#### Example Usage

[](#example-usage-18)

```
$id = 'id';

$result = $mMS->cancelMMSCampaign($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".MMSController.getMMSCampaignLinkHits")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getMMSCampaignLinkHits

[](#-getmmscampaignlinkhits)

> Get information about link hits from an MMS Campaign successfully sent

```
function getMMSCampaignLinkHits(
        $id,
        $sort = 'last_hit',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-17)

ParameterTagsDescriptionid`Required`MMS Campaign IDsort`Optional` `DefaultValue`Sort by (field name)filters`Optional`Filter by (field value)page`Optional` `DefaultValue`The page number of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-19)

```
$id = 'id';
$sort = 'last_hit';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $mMS->getMMSCampaignLinkHits($id, $sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".MMSController.getMMSMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getMMSMessage

[](#-getmmsmessage)

> Get information about an MMS Message

```
function getMMSMessage($id)
```

#### Parameters

[](#parameters-18)

ParameterTagsDescriptionid`Required`MMS ID#### Example Usage

[](#example-usage-20)

```
$id = 'id';

$result = $mMS->getMMSMessage($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".MMSController.getMMSCampaigns")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getMMSCampaigns

[](#-getmmscampaigns)

> Get information of all MMS Campaigns

```
function getMMSCampaigns(
        $sort = 'updated_at',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-19)

ParameterTagsDescriptionsort`Optional` `DefaultValue`Sort by (field name)filters`Optional`Filter by (field value)page`Optional` `DefaultValue`The page of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-21)

```
$sort = 'updated_at';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $mMS->getMMSCampaigns($sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".MMSController.getMMSCampaign")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getMMSCampaign

[](#-getmmscampaign)

> Get information about a specific MMS Campaign

```
function getMMSCampaign($id)
```

#### Parameters

[](#parameters-20)

ParameterTagsDescriptionid`Required`Campaign ID#### Example Usage

[](#example-usage-22)

```
$id = 'id';

$result = $mMS->getMMSCampaign($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".MMSController.sendMMS")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendMMS

[](#-sendmms)

> Send MMS to single contact

```
function sendMMS($body)
```

#### Parameters

[](#parameters-21)

ParameterTagsDescriptionbody`Required`MMS Details#### Example Usage

[](#example-usage-23)

```
$body = new MMS();

$result = $mMS->sendMMS($body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".MMSController.sendMMSCampaign")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendMMSCampaign

[](#-sendmmscampaign)

> Send an MMS Campaign

```
function sendMMSCampaign($body)
```

#### Parameters

[](#parameters-22)

ParameterTagsDescriptionbody`Required`MMS campaign details#### Example Usage

[](#example-usage-24)

```
$body = new MMSCampaign();

$result = $mMS->sendMMSCampaign($body);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".SMSController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) SMSController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-smscontroller)

### Get singleton instance

[](#get-singleton-instance-3)

The singleton instance of the `SMSController` class can be accessed from the API Client.

```
$sMS = $client->getSMS();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.getSMSInbox")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSMSInbox

[](#-getsmsinbox)

> Get all the inbound SMS messages (MOs and Replies)

```
function getSMSInbox(
        $sort = 'received_at',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-23)

ParameterTagsDescriptionsort`Optional` `DefaultValue`Sort by (field name)filters`Optional`Filter by (field value)page`Optional` `DefaultValue`The page of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-25)

```
$sort = 'received_at';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $sMS->getSMSInbox($sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.cancelSMSCampaign")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) cancelSMSCampaign

[](#-cancelsmscampaign)

> Cancel an SMS Campaign. NOTE: Only campaigns in SCHEDULED or VALIDATING status can be cancelled

```
function cancelSMSCampaign($id)
```

#### Parameters

[](#parameters-24)

ParameterTagsDescriptionid`Required`SMS Campaign ID#### Example Usage

[](#example-usage-26)

```
$id = 'id';

$result = $sMS->cancelSMSCampaign($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.getSMSCampaignLinkHits")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSMSCampaignLinkHits

[](#-getsmscampaignlinkhits)

> Get SMS Campaign link hits

```
function getSMSCampaignLinkHits(
        $id,
        $sort = 'last_hit',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-25)

ParameterTagsDescriptionid`Required`SMS Campaign IDsort`Optional` `DefaultValue`Sort by (field name)filters`Optional`Filter by (field value)page`Optional` `DefaultValue`The page number of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-27)

```
$id = 'id';
$sort = 'last_hit';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $sMS->getSMSCampaignLinkHits($id, $sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.getSMSCampaignReplies")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSMSCampaignReplies

[](#-getsmscampaignreplies)

> Fetch replies to a campaign from recipients

```
function getSMSCampaignReplies(
        $id,
        $sort = 'received_at',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-26)

ParameterTagsDescriptionid`Required`SMS Campaign IDsort`Optional` `DefaultValue`Sort by (field name)filters`Optional`Filter by (field value)page`Optional` `DefaultValue`The page number of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-28)

```
$id = 'id';
$sort = 'received_at';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $sMS->getSMSCampaignReplies($id, $sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.getSMSCampaignReport")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSMSCampaignReport

[](#-getsmscampaignreport)

> Fetch the activity details report for an SMS campaign already sent. NOTE: The information can be retrieved only for those campaigns that have either been already sent, is in the process of getting sent or for throttled campaigns that is at least partially sent.

```
function getSMSCampaignReport($id)
```

#### Parameters

[](#parameters-27)

ParameterTagsDescriptionid`Required`SMS Campaign ID#### Example Usage

[](#example-usage-29)

```
$id = 'id';

$result = $sMS->getSMSCampaignReport($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.getSMSCampaigns")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSMSCampaigns

[](#-getsmscampaigns)

> Fetch a list and details of all SMS campaigns in your TransmitMessage account across all statuses

```
function getSMSCampaigns(
        $sort = 'updated_at',
        $filters = null,
        $page = 0,
        $limit = 25)
```

#### Parameters

[](#parameters-28)

ParameterTagsDescriptionsort`Optional` `DefaultValue`Sort by (field name)filters`Optional`Filter by (field value)page`Optional` `DefaultValue`The page of results to fetchlimit`Optional` `DefaultValue`The number of results to fetch per page; maximum 100#### Example Usage

[](#example-usage-30)

```
$sort = 'updated_at';
$filters = 'filters';
$page = 0;
$limit = 25;

$result = $sMS->getSMSCampaigns($sort, $filters, $page, $limit);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.getSMSCampaign")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSMSCampaign

[](#-getsmscampaign)

> Fetch details of a specific SMS Campaign

```
function getSMSCampaign($id)
```

#### Parameters

[](#parameters-29)

ParameterTagsDescriptionid`Required`SMS Campaign ID#### Example Usage

[](#example-usage-31)

```
$id = 'id';

$result = $sMS->getSMSCampaign($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.sendSMS")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendSMS

[](#-sendsms)

> Send SMS

```
function sendSMS($body)
```

#### Parameters

[](#parameters-30)

ParameterTagsDescriptionbody`Required`SMS details (from, to and content)#### Example Usage

[](#example-usage-32)

```
$body = new SMS();

$result = $sMS->sendSMS($body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.getSMSRecord")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSMSRecord

[](#-getsmsrecord)

> Fetch details of an SMS sent

```
function getSMSRecord($id)
```

#### Parameters

[](#parameters-31)

ParameterTagsDescriptionid`Required`Message ID of the SMS#### Example Usage

[](#example-usage-33)

```
$id = 'id';

$result = $sMS->getSMSRecord($id);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SMSController.sendSMSCampaign")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendSMSCampaign

[](#-sendsmscampaign)

> Send SMS Campaign

```
function sendSMSCampaign($body)
```

#### Parameters

[](#parameters-32)

ParameterTagsDescriptionbody`Required`SMS campaign details#### Example Usage

[](#example-usage-34)

```
$body = new SMSCampaign();

$result = $sMS->sendSMSCampaign($body);
```

[Back to List of Controllers](#list_of_controllers)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![codechito](https://avatars.githubusercontent.com/u/44714487?v=4)](https://github.com/codechito "codechito (2 commits)")

### Embed Badge

![Health badge](/badges/codechito-php-client-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/codechito-php-client-sdk/health.svg)](https://phpackages.com/packages/codechito-php-client-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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