- Edited
I need to be able to pass user information as an internal note in an API created ticket. So far I have the following code which will send a ticket but will not pass the internal note or the phone number...$config = array(
'url'=> 'https://xxxx.com/support/api/http.php/tickets.json',
'key'=> 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
);
$name = 'TEST API USER';
$email = 'test@test.com';
$mobile = '5555555555';
$subject = 'just testing';
$text = 'test message';
$notes = 'this is an internal note';
$data = array(
'name' => $name,
'email' => $email,
'subject' => $subject,
'message' => $text,
'notes' => $notes,
'phone' => $mobile,
'ip' => $_SERVER,
);
set_time_limit(30);
$options = array(
'http' => array(
'header' => "X_API_Key: ".$config,
'method' => 'POST',
'content' => json_encode($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($config, false, $context);
if ($result === FALSE) { die("FAILED"); }
echo($result);The API documentation found here mentions internal notes and phone numbers as custom fields. I have read several requests for this functionality in this forum...http://forum.osticket.com/d/discussion//show-internal-notes-inline-with-ticket-threadhttp://forum.osticket.com/d/discussion//add-notes-to-ticket-via-apihttp://forum.osticket.com/d/discussion//internal-comment-with-apiThis ability is essential for us and I'm sure others. Is there any way to achieve this?