PHPackages                             apimatic-unofficial/unifonicnextgen - 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. apimatic-unofficial/unifonicnextgen

ActiveLibrary[API Development](/categories/api)

apimatic-unofficial/unifonicnextgen
===================================

\## Introduction Send SMS messages using Unifonic Messaging API. Get your dedicated Universal number, and start sending messages today. Unifonic NextGen Restful and HTTP \*\*API's\*\* uses The basic Authentication protocol. All request and response bodies are formatted in JSON. ## Get an account To start using the API you need to send an email to Unifonic to create Appsid for you. ## Base URL All URLs referenced in the documentation have the following base: \*\*basic.unifonic.com\*\* ## Security To ensure privacy we recommend you to use HTTPS for all Unifonic API requests. you can download our HTTPS certificate. \[Download\] (https://api.unifonic.com/udm/https.zip) ## Formats Unifonic API only supports JSON format. All request must use the Content-type header set to application/json. ## Support We’re here to help! Get in touch with support at &lt;support@unifonic.com&gt; and we’ll get back to you as soon as we can or you can contact us throw live chat on our \[website\] (www.unifonic.com).

0253↓75%PHP

Since Apr 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/tawfekov/unifonicnextgen)[ Packagist](https://packagist.org/packages/apimatic-unofficial/unifonicnextgen)[ RSS](/packages/apimatic-unofficial-unifonicnextgen/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#getting-started)

Introduction
------------

[](#introduction)

Send SMS messages using Unifonic Messaging API. Get your dedicated Universal number, and start sending messages today.

Unifonic NextGen Restful and HTTP **API's** uses The basic Authentication protocol. All request and response bodies are formatted in JSON.

Get an account
--------------

[](#get-an-account)

To start using the API you need to send an email to Unifonic to create Appsid for you.

Base URL
--------

[](#base-url)

All URLs referenced in the documentation have the following base:

**basic.unifonic.com**

Security
--------

[](#security)

To ensure privacy we recommend you to use HTTPS for all Unifonic API requests. you can download our HTTPS certificate.

\[Download\] ()

Formats
-------

[](#formats)

Unifonic API only supports JSON format. All request must use the Content-type header set to application/json.

Support
-------

[](#support)

We’re here to help! Get in touch with support at  and we’ll get back to you as soon as we can or you can contact us throw live chat on our \[website\] ([www.unifonic.com](http://www.unifonic.com)).

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/9cfd9333960ee3b42fe2e9aa48ed996d146317ee443cee592c4739c6096acfc1/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/9cfd9333960ee3b42fe2e9aa48ed996d146317ee443cee592c4739c6096acfc1/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

### \[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 UnifonicNextGen 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/2850d11d24ec1188299ea0de13fa978b912e879f2694a01d9df9b337a23c1d4d/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/2850d11d24ec1188299ea0de13fa978b912e879f2694a01d9df9b337a23c1d4d/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

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/05cf0d73b3525887c8979da01ed18e0b6dd4357fb46e84a79933bdf008a97347/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/05cf0d73b3525887c8979da01ed18e0b6dd4357fb46e84a79933bdf008a97347/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

### 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/5a2a0119ebc8cd8872d1300ba43e5742eb822b51e0fa7bcfbdc72094d125d228/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/5a2a0119ebc8cd8872d1300ba43e5742eb822b51e0fa7bcfbdc72094d125d228/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

Name the directory as "test"

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

Add a PHP file to this project

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

Name it "testSDK"

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

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/42fc73099c875f10a7e4d587e49d800005bdbd69f764b1b27c860c963c911497/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/42fc73099c875f10a7e4d587e49d800005bdbd69f764b1b27c860c963c911497/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

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/df87ff0a36933274a12beda9cc637363d0039e198e850ec3155fa147eded70d3/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/df87ff0a36933274a12beda9cc637363d0039e198e850ec3155fa147eded70d3/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

Select `PHP` from within `Languages & Frameworks`

[![Run Test Project - Step 2](https://camo.githubusercontent.com/322ffe1d75322b949ef9e874fbdb20cac49e44d754593e0ccbb3bb125efa8b8c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/322ffe1d75322b949ef9e874fbdb20cac49e44d754593e0ccbb3bb125efa8b8c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

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

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

Once the interpreter is selected, click `OK`

[![Run Test Project - Step 4](https://camo.githubusercontent.com/b1c2d5631873070b8e885678546915e1f340360445539457bfa431bce5e1b88e/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/b1c2d5631873070b8e885678546915e1f340360445539457bfa431bce5e1b88e/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

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/757920707d7893bfe39a4a3d2ef1f5e972975a365bc5ee3b9c2cf7d78dbfceed/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)](https://camo.githubusercontent.com/757920707d7893bfe39a4a3d2ef1f5e972975a365bc5ee3b9c2cf7d78dbfceed/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d556e69666f6e69632532304e65787447656e2d504850)

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.

ParameterDescriptionbasicAuthUserNameThe username to use with basic authenticationbasicAuthPasswordThe password to use with basic authenticationAPI client can be initialized as following.

```
$basicAuthUserName = 'basicAuthUserName'; // The username to use with basic authentication
$basicAuthPassword = 'basicAuthPassword'; // The password to use with basic authentication

$client = new UnifonicNextGenLib\UnifonicNextGenClient($basicAuthUserName, $basicAuthPassword);
```

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

[](#class-reference)

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

[](#list-of-controllers)

- [WrapperController](#wrapper_controller)
- [RestController](#rest_controller)

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

[](#-wrappercontroller)

### Get singleton instance

[](#get-singleton-instance)

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

```
$wrapper = $client->getWrapper();
```

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

[](#-createsendmessage)

> Unifonic Send Wrapper API allows you to send text messages to multiple users at the same time

```
function createSendMessage(
        $appsid,
        $msg,
        $to,
        $sender,
        $baseEncode = false,
        $encoding = 'UCS2')
```

#### Parameters

[](#parameters)

ParameterTagsDescriptionappsid`Required`A character string that uniquely identifies your appmsg`Required`Message body supports both English and unicodes characters, concatenated messages is supportedto`Required`Destination mobile number, mobile numbers must be in international format without 00 or + Example: (4452023498)sender`Required`The SenderID to send from, App default SenderID is used unless else statedbaseEncode`Optional` `DefaultValue`Binary-to-text encoding schemes that represent binary data in an ASCII string formatencoding`Optional` `DefaultValue`Converts information from a source into symbols for communication or storage, GSM7 for English and UCS2 for Arabic#### Example Usage

[](#example-usage)

```
$appsid = '6v253153s1g7831s5';
$msg = 'Test';
$to = 966505980169;
$sender = 'sender';
$baseEncode = false;
$encoding = 'UCS2';

$result = $wrapper->createSendMessage($appsid, $msg, $to, $sender, $baseEncode, $encoding);
```

#### Errors

[](#errors)

Error CodeError Description401Authentication failed402Missing parameter AppSid459Authentication parameters are incorrectly base64 encoded### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WrapperController.createGetMsgQuery")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createGetMsgQuery

[](#-creategetmsgquery)

> Unifonic Get message query API allows you to get details of specified message.

```
function createGetMsgQuery(
        $appsid,
        $msgid,
        $to = null)
```

#### Parameters

[](#parameters-1)

ParameterTagsDescriptionappsid`Required`A character string that uniquely identifies your appmsgid`Required`A unique ID that identifies a messageto`Optional`Destination mobile number, mobile numbers must be in international format without 00 or + Example: (4452023498)#### Example Usage

[](#example-usage-1)

```
$appsid = '6v253153s1g7831s5';
$msgid = 3200017891630;
$to = 966505980169;

$result = $wrapper->createGetMsgQuery($appsid, $msgid, $to);
```

#### Errors

[](#errors-1)

Error CodeError Description401Authentication failed402Missing parameter AppSid432MessageId must be numeric452User must specify either messageId or recipient parameter[Back to List of Controllers](#list_of_controllers)

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

[](#-restcontroller)

### Get singleton instance

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

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

```
$rest = $client->getRest();
```

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

[](#-getscheduledmessagedetails)

> Unifonic Scheduled message details allows you to get details of scheduled messages through simple RESTful APIs

```
function getScheduledMessageDetails($appSid)
```

#### Parameters

[](#parameters-2)

ParameterTagsDescriptionappSid`Required`A character string that uniquely identifies your app#### Example Usage

[](#example-usage-2)

```
$appSid = '6v253153s1g7831s5';

$result = $rest->getScheduledMessageDetails($appSid);
```

#### Errors

[](#errors-2)

Error CodeError Description401Authentication failed### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RestController.createSendMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createSendMessage

[](#-createsendmessage-1)

> Unifonic Send API allows you to send text messages to users around the globe through simple RESTful APIs

```
function createSendMessage(
        $appSid,
        $senderID,
        $body,
        $recipient,
        $responseType = null,
        $correlationID = null,
        $baseEncode = null,
        $statusCallback = null,
        $async = false)
```

#### Parameters

[](#parameters-3)

ParameterTagsDescriptionappSid`Required`A character string that uniquely identifies your appsenderID`Required`The SenderID to send from, App default SenderID is used unless else statedbody`Required`Message body supports both English and unicodes characters, concatenated messages is supportedrecipient`Required`Destination mobile number, mobile numbers must be in international format without 00 or + Example: (4452023498)responseType`Optional`Support json format onlycorrelationID`Optional`Is a unique identifier value that is attached to requests and messagesbaseEncode`Optional`Binary-to-text encoding schemes that represent binary data in an ASCII string formatstatusCallback`Optional`Filter messages report according to a specific message status, "Sent", "Queued", "Rejected" or "Failedasync`Optional` `DefaultValue`It specifies that the request will be executed asynchronously as soon as it is sent#### Example Usage

[](#example-usage-3)

```
$appSid = '6v253153s1g7831s5';
$senderID = 'sender';
$body = 'Test';
$recipient = 966505980169;
$responseType = 'responseType';
$correlationID = 'CorrelationID';
$baseEncode = true;
$statusCallback = 'statusCallback';
$async = false;

$result = $rest->createSendMessage($appSid, $senderID, $body, $recipient, $responseType, $correlationID, $baseEncode, $statusCallback, $async);
```

#### Errors

[](#errors-3)

Error CodeError Description401Authentication failed449Message body is empty480This user cannot use specified SenderID482Invalid dest num### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RestController.createSendScheduledMessages")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createSendScheduledMessages

[](#-createsendscheduledmessages)

> Unifonic Send Scheduled API allows you to schedule text messages to users around the globe through simple RESTful API to be sent in future.

```
function createSendScheduledMessages(
        $appSid,
        $senderID,
        $recipient,
        $body,
        $timeScheduled,
        $responseType = null,
        $correlationID = null,
        $baseEncode = null)
```

#### Parameters

[](#parameters-4)

ParameterTagsDescriptionappSid`Required`A character string that uniquely identifies your appsenderID`Required`The SenderID to send from, App default SenderID is used unless else statedrecipient`Required`Destination mobile number, mobile numbers must be in international format without 00 or + Example: (4452023498)body`Required`Message body supports both English and unicodes characters, concatenated messages is supportedtimeScheduled`Required`Schedule send messages, in the following format yyyy-mm-dd HH:mm:ssresponseType`Optional`Support json format onlycorrelationID`Optional`Is a unique identifier value that is attached to requests and messagesbaseEncode`Optional`Binary-to-text encoding schemes that represent binary data in an ASCII string format#### Example Usage

[](#example-usage-4)

```
$appSid = '6v253153s1g7831s5';
$senderID = 'sender';
$recipient = 966505980169;
$body = 'Test';
$timeScheduled = 2020-04-12 11:50:00;
$responseType = 'responseType';
$correlationID = 'CorrelationID';
$baseEncode = true;

$result = $rest->createSendScheduledMessages($appSid, $senderID, $recipient, $body, $timeScheduled, $responseType, $correlationID, $baseEncode);
```

#### Errors

[](#errors-4)

Error CodeError Description401Authentication failed406Wrong parameter format449Message body is empty451TimeScheduled parameter must indicate time in the future480This user cannot use specified SenderID482Invalid dest num### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RestController.deleteStopScheduledMessages")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteStopScheduledMessages

[](#-deletestopscheduledmessages)

> Unifonic Stop scheduled messages API allows you to Delete (Stops) scheduled message,If MessageID is specified only one message is stopped, Otherwise all messages are stopped through simple RESTful APIs.

```
function deleteStopScheduledMessages(
        $appSid,
        $messageID = null,
        $responseFormat = null,
        $baseEncode = null)
```

#### Parameters

[](#parameters-5)

ParameterTagsDescriptionappSid`Required`A character string that uniquely identifies your appmessageID`Optional`A unique ID that identifies a messageresponseFormat`Optional`support json format onlybaseEncode`Optional`Binary-to-text encoding schemes that represent binary data in an ASCII string format#### Example Usage

[](#example-usage-5)

```
$appSid = '6v253153s1g7831s5';
$messageID = 3200017889502;
$responseFormat = 'responseFormat';
$baseEncode = true;

$result = $rest->deleteStopScheduledMessages($appSid, $messageID, $responseFormat, $baseEncode);
```

#### Errors

[](#errors-5)

Error CodeError Description401Authentication failed455Scheduled message not found for this User### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RestController.createGetMessageDetails")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createGetMessageDetails

[](#-creategetmessagedetails)

> Unifonic Get message details API allows you to get details of messages with optional filters,returns paginated messages, next page or previous page through simple RESTful APIs

```
function createGetMessageDetails(
        $appSid,
        $messageID = null,
        $senderID = null,
        $recipient = null,
        $dateFrom = null,
        $dateTo = null,
        $correlationID = null,
        $limit = null,
        $baseEncode = null)
```

#### Parameters

[](#parameters-6)

ParameterTagsDescriptionappSid`Required`A character string that uniquely identifies your appmessageID`Optional`A unique ID that identifies a messagesenderID`Optional`The SenderID to send from, App default SenderID is used unless else statedrecipient`Optional`Destination mobile number, mobile numbers must be in international format without 00 or + Example: (4452023498)dateFrom`Optional`The start date for the report time interval, date format should be yyyy-mm-dddateTo`Optional`The end date for the report time interval, date format should be yyyy-mm-ddcorrelationID`Optional`Is a unique identifier value that is attached to requests and messageslimit`Optional`The maximum number of messages detailsbaseEncode`Optional`Binary-to-text encoding schemes that represent binary data in an ASCII string format#### Example Usage

[](#example-usage-6)

```
$appSid = '6v253153s1g7831s5';
$messageID = 2000000172800;
$senderID = 'sender';
$recipient = 966505980169;
$dateFrom = 2018-04-12;
$dateTo = 2018-09-12;
$correlationID = 'CorrelationID';
$limit = 20;
$baseEncode = true;

$result = $rest->createGetMessageDetails($appSid, $messageID, $senderID, $recipient, $dateFrom, $dateTo, $correlationID, $limit, $baseEncode);
```

#### Errors

[](#errors-6)

Error CodeError Description401Authentication failed432MessageId must be numeric599Request failed[Back to List of Controllers](#list_of_controllers)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

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/d38462c8c15dac380b501a345c3374005132f966043982e392aecdc1762a7cd7?d=identicon)[tawfekov](/maintainers/tawfekov)

---

Top Contributors

[![tawfekov](https://avatars.githubusercontent.com/u/94997?v=4)](https://github.com/tawfekov "tawfekov (1 commits)")

### Embed Badge

![Health badge](/badges/apimatic-unofficial-unifonicnextgen/health.svg)

```
[![Health](https://phpackages.com/badges/apimatic-unofficial-unifonicnextgen/health.svg)](https://phpackages.com/packages/apimatic-unofficial-unifonicnextgen)
```

###  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)
