PHPackages                             apimaticsupport/conversationsapi - 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. apimaticsupport/conversationsapi

ActiveLibrary[API Development](/categories/api)

apimaticsupport/conversationsapi
================================

\## Introduction Send messages using unifonic’s Conversations API. Message your target audience over social channels (WhatsApp for Business, Messenger, SMS, etc..). Unifonic conversations API 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 support@unifonic.com to create an account for you. ## Base URL All URLs referenced in the documentation have the following base: \*\*apis.unifonic.com\*\* ## Security To ensure privacy, we recommend you to use HTTPS for all unifonic API requests. ## Formats conversations API only supports JSON format. All requests 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).

0.1.0(3y ago)059MITPHPPHP &gt;=5.4.0

Since Apr 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/syedali996/conversationsapi)[ Packagist](https://packagist.org/packages/apimaticsupport/conversationsapi)[ Docs](https://apimatic.io)[ RSS](/packages/apimaticsupport-conversationsapi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

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

[](#getting-started)

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

[](#introduction)

Send messages using unifonic’s Conversations API. Message your target audience over social channels (WhatsApp for Business, Messenger, SMS, etc..).

Unifonic conversations API 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 create an account for you.

Base URL
--------

[](#base-url)

All URLs referenced in the documentation have the following base: **apis.unifonic.com**

Security
--------

[](#security)

To ensure privacy, we recommend you to use HTTPS for all unifonic API requests.

Formats
-------

[](#formats)

conversations API only supports JSON format. All requests 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/18b2611fd86e7be2805de7c5770ba7d6862b4aae2d93ebd6f1ba01e0874d2588/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)](https://camo.githubusercontent.com/18b2611fd86e7be2805de7c5770ba7d6862b4aae2d93ebd6f1ba01e0874d2588/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)

### \[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 ConversationsAPI 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/647e34e5d0a0ede854c9e8e5f997d5f8e9e6520c0a6ba7dc3bb52e28a96a5140/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)](https://camo.githubusercontent.com/647e34e5d0a0ede854c9e8e5f997d5f8e9e6520c0a6ba7dc3bb52e28a96a5140/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)

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

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

Name the directory as "test"

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

Add a PHP file to this project

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

Name it "testSDK"

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

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/75a49c1758a2ccd2392bcd423ba09d0b1671b4e555989c4f34b05ad6f8160dd4/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)](https://camo.githubusercontent.com/75a49c1758a2ccd2392bcd423ba09d0b1671b4e555989c4f34b05ad6f8160dd4/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)

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/277ebfb8aa0390a7cf7b7b3a773c247e2706b236625d475cb4f92d3538ec7461/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)](https://camo.githubusercontent.com/277ebfb8aa0390a7cf7b7b3a773c247e2706b236625d475cb4f92d3538ec7461/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)

Select `PHP` from within `Languages & Frameworks`

[![Run Test Project - Step 2](https://camo.githubusercontent.com/c887c2c0df3e5fe0cd2f842484e935aa42723f453b2245444ae528bd5cc91c1f/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)](https://camo.githubusercontent.com/c887c2c0df3e5fe0cd2f842484e935aa42723f453b2245444ae528bd5cc91c1f/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)

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

[![Run Test Project - Step 3](https://camo.githubusercontent.com/62b7c9278240bb8c2c4de54cc807686e7191ed12e55bc006765884d80b824c84/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)](https://camo.githubusercontent.com/62b7c9278240bb8c2c4de54cc807686e7191ed12e55bc006765884d80b824c84/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)

Once the interpreter is selected, click `OK`

[![Run Test Project - Step 4](https://camo.githubusercontent.com/3415269a614617d9f3dde273c38f3019688e5851d165ab9cbd6f5132206f8cb2/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)](https://camo.githubusercontent.com/3415269a614617d9f3dde273c38f3019688e5851d165ab9cbd6f5132206f8cb2/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d436f6e766572736174696f6e732532304150492d504850)

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

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.

ParameterDescriptionpublicIdPublicId from application's API keys tab.secretSecret from application's API keys tab.API client can be initialized as following.

```
$publicId = '{{PublicId}}'; // PublicId from application's API keys tab.
$secret = '{{Secret}}'; // Secret from application's API keys tab.

$client = new ConversationsAPILib\ConversationsAPIClient($publicId, $secret);
```

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

[](#class-reference)

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

[](#list-of-controllers)

- [OutboundMessagesController](#outbound_messages_controller)
- [WhatsappOutboundTemplateMessageController](#whatsapp_outbound_template_message_controller)
- [WhatsappOutboundSessionMessageController](#whatsapp_outbound_session_message_controller)

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

[](#-outboundmessagescontroller)

### Get singleton instance

[](#get-singleton-instance)

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

```
$outboundMessages = $client->getOutboundMessages();
```

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

[](#-sendmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendMessage($body)
```

#### Parameters

[](#parameters)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage)

```
$body = new GenericMessageStructure();

$result = $outboundMessages->sendMessage($body);
```

#### Errors

[](#errors)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error[Back to List of Controllers](#list_of_controllers)

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

[](#-whatsappoutboundtemplatemessagecontroller)

### Get singleton instance

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

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

```
$whatsapp_OutboundTemplateMessage = $client->getWhatsappOutboundTemplateMessage();
```

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

[](#-sendtemplatetextmessage)

> This API works only with WhatsApp channel, it allows you to check whether a phone number has an active WhatsApp account or not. This end API allows you to implement call center IVR to WhatsApp deflection.

```
function sendTemplateTextMessage(
        $body,
        $contentType)
```

#### Parameters

[](#parameters-1)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.contentType`Required` `DefaultValue`Content-Type#### Example Usage

[](#example-usage-1)

```
$body = new GenericMessageStructureWithTemplate();
$contentType = 'application/json';

$result = $whatsapp_OutboundTemplateMessage->sendTemplateTextMessage($body, $contentType);
```

#### Errors

[](#errors-1)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error[Back to List of Controllers](#list_of_controllers)

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

[](#-whatsappoutboundsessionmessagecontroller)

### Get singleton instance

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

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

```
$whatsapp_OutboundSessionMessage = $client->getWhatsappOutboundSessionMessage();
```

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

[](#-sendtextsessionmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendTextSessionMessage($body)
```

#### Parameters

[](#parameters-2)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-2)

```
$body = new GenericMessageStructureWithText();

$result = $whatsapp_OutboundSessionMessage->sendTextSessionMessage($body);
```

#### Errors

[](#errors-2)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendImageSessionMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendImageSessionMessage

[](#-sendimagesessionmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendImageSessionMessage($body)
```

#### Parameters

[](#parameters-3)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-3)

```
$body = new GenericMessageStructureWithImage();

$result = $whatsapp_OutboundSessionMessage->sendImageSessionMessage($body);
```

#### Errors

[](#errors-3)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendVideoSessionMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendVideoSessionMessage

[](#-sendvideosessionmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendVideoSessionMessage($body)
```

#### Parameters

[](#parameters-4)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-4)

```
$body = new GenericMessageStructureWithVideo();

$result = $whatsapp_OutboundSessionMessage->sendVideoSessionMessage($body);
```

#### Errors

[](#errors-4)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendAudioSessionMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendAudioSessionMessage

[](#-sendaudiosessionmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendAudioSessionMessage($body)
```

#### Parameters

[](#parameters-5)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-5)

```
$body = new GenericMessageStructureWithAudio();

$result = $whatsapp_OutboundSessionMessage->sendAudioSessionMessage($body);
```

#### Errors

[](#errors-5)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendFileSessionMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendFileSessionMessage

[](#-sendfilesessionmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendFileSessionMessage($body)
```

#### Parameters

[](#parameters-6)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-6)

```
$body = new GenericMessageStructureWithFile();

$result = $whatsapp_OutboundSessionMessage->sendFileSessionMessage($body);
```

#### Errors

[](#errors-6)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendContactsSessionMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendContactsSessionMessage

[](#-sendcontactssessionmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendContactsSessionMessage($body)
```

#### Parameters

[](#parameters-7)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-7)

```
$body = new GenericMessageStructureWithContacts();

$result = $whatsapp_OutboundSessionMessage->sendContactsSessionMessage($body);
```

#### Errors

[](#errors-7)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendLocationSessionMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendLocationSessionMessage

[](#-sendlocationsessionmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendLocationSessionMessage($body)
```

#### Parameters

[](#parameters-8)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-8)

```
$body = new GenericMessageStructureWithLocation();

$result = $whatsapp_OutboundSessionMessage->sendLocationSessionMessage($body);
```

#### Errors

[](#errors-8)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendListMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendListMessage

[](#-sendlistmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendListMessage($body)
```

#### Parameters

[](#parameters-9)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-9)

```
$body = new GenericMessageStructureWithListMessage();

$result = $whatsapp_OutboundSessionMessage->sendListMessage($body);
```

#### Errors

[](#errors-9)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendReplyButtonMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendReplyButtonMessage

[](#-sendreplybuttonmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendReplyButtonMessage($body)
```

#### Parameters

[](#parameters-10)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-10)

```
$body = new GenericMessageStructureWithReplyButton();

$result = $whatsapp_OutboundSessionMessage->sendReplyButtonMessage($body);
```

#### Errors

[](#errors-10)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendProductMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendProductMessage

[](#-sendproductmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendProductMessage($body)
```

#### Parameters

[](#parameters-11)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-11)

```
$body = new GenericMessageStructureWithProduct();

$result = $whatsapp_OutboundSessionMessage->sendProductMessage($body);
```

#### Errors

[](#errors-11)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".WhatsappOutboundSessionMessageController.sendProductListMessage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) sendProductListMessage

[](#-sendproductlistmessage)

> This endpoint allows you to send a message across any of our conversations channels, supported messages types can be found under the Structures section.

```
function sendProductListMessage($body)
```

#### Parameters

[](#parameters-12)

ParameterTagsDescriptionbody`Required`Request with correct body for the message type you want to send.#### Example Usage

[](#example-usage-12)

```
$body = new GenericMessageStructureWithProductList();

$result = $whatsapp_OutboundSessionMessage->sendProductListMessage($body);
```

#### Errors

[](#errors-12)

Error CodeError Description400Invalid request sent403User is not authorized to access this resource with an explicit deny500Internal Server Error[Back to List of Controllers](#list_of_controllers)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1139d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d52683133bd7972934d8c884d0bef771ebcfc405a8bc2b0a151a26c73ff0386?d=identicon)[apimaticsupport](/maintainers/apimaticsupport)

---

Top Contributors

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

---

Tags

apisdkConversations API

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/apimaticsupport-conversationsapi/health.svg)

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

###  Alternatives

[square/square

Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.

793.4M21](/packages/square-square)[bandwidth/sdk

Bandwidth's set of APIs

16948.8k1](/packages/bandwidth-sdk)

PHPackages © 2026

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