The Message API


Message Information


A returned user consists of the following information:

Message ID      [id]
The unique message id.
User From ID      [fromID]
The id of the user the message was sent from.
From Email Address      [fromEmail]
The email address this message was sent from.
User To ID      [toID]
The id of the user the message was sent to (This will appear empty if it was sent to the ticket system).
To Email Address      [toEmail]
The email address this message was sent to.
Ticket ID      [ticketID]
The ticket this message belongs to.
Message Contents      [messageContents]
The contents of the message.
Date Received      [messageDate]
The date the message was received.
CC's      [ccs]
List of anyone that was cc'd on the message.
BCC's      [bccs]
List of anyone that was bcc'd on the message.

This method returns all messages from a Ticket.


You will need to use the required information, and may need to use the optional information below.


Optional Information:

Required Information:



Example 1:

https://rhinosupport.com/API/Message/?apiCode=[apiCode]&ticketID=[ticketID]

Example 2:

https://rhinosupport.com/API/Message/?apiCode=[apiCode]&ticketID=[ticketID]&responseType=json

PHP Curl Example
<?php $request = curl_init('https://api.rhinosupport.com/API/Message/?apiCode=[apiCode]&ticketID=[ticketID]');
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($request);
curl_close($request);
echo $result;
?>


 

This method lets you create a new message into an existing ticket.


You will need to use the required information, and may need to use the optional information below.


Optional Information:

  • CC`s      [ccs]
  • BCC`s      [bccs]
Required Information:



PHP Curl Example 1:

<?php $request = curl_init ('https://www.rhinosupport.com/API/Message/');
$postFields = array();
$postFields['apiCode'] = '[apiCode]';
$postFields['toEmail'] = '[toEmail]';
$postFields['ticketID'] = '[ticketID]';
$postFields['messageContents'] = '[messageContents]';


curl_setopt ($request, CURLOPT_POST, true);
curl_setopt ($request, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt ($request, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec ($request);
curl_close ($request);
echo $result;
?>


PHP Curl Example 2:

<?php $request = curl_init ('https://www.rhinosupport.com/API/User/');
$postFields = array();
$postFields['apiCode'] = '[apiCode]';
$postFields['toEmail'] = '[toEmail]';
$postFields['ticketID'] = '[ticketID]';
$postFields['messageContents'] = '[messageContents]';
$postFields['ccs'] = '[ccs]';
$postFields['bccs'] = '[bccs]';


curl_setopt ($request, CURLOPT_POST, true);
curl_setopt ($request, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt ($request, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec ($request);
curl_close ($request);
echo $result;
?>


 

This method lets you update an existing ticket.


You will need to use the required information, and may need to use the optional information below.


Optional Information:

Required Information:



PHP Curl Example 1:

<?php $request = curl_init ('https://www.rhinosupport.com/API/User/');
$postFields = array();
$postFields['apiCode'] = '[apiCode]';
$postFields['id'] = '[id]';


curl_setopt ($request, CURLOPT_POST, true);
curl_setopt ($request, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt ($request, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec ($request);
curl_close ($request);
echo $result;
?>


PHP Curl Example 2:

<?php $request = curl_init ('https://www.rhinosupport.com/API/User/');
$postFields = array();
$postFields['apiCode'] = '[apiCode]';
$postFields['id'] = '[id]';
$postFields['emailAddress'] = '[emailAddress]';
$postFields['firstName'] = '[firstName]';
$postFields['lastName'] = '[lastName]';
$postFields['userType'] = '[userType]';
$postFields['companyName'] = '[companyName]';
$postFields['companyURL'] = '[companyURL]';
$postFields['phoneNumber'] = '[phoneNumber]';
$postFields['address'] = '[address]';


curl_setopt ($request, CURLOPT_POST, true);
curl_setopt ($request, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt ($request, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec ($request);
curl_close ($request);
echo $result;
?>


 

Account Options


×  
×