The REST API is only for remote things, your plugin is built right into osTicket right? So you can just create the ticket with your url handler. If you are actually using REST, then you aren't using a plugin.. The examples demonstrate the API with curl. Not sure about forms on API tickets.. It's probably possible.If you are actually using a plugin, you should be able to build a ticket with something like the following:I'll assume you have variables like: $name,$email, $subject, $message_text etc on hand..
require_once (INCLUDE_DIR . 'class.ticket.php'); $vars = $errors = array();
// Make a new ticket.
$vars = $email;
$vars = $subject;
$vars = $name;
$vars = $message_text;
$vars = 2; // You choose.
$vars = 'Other';
$ticket = Ticket:($vars, $errors, 'api');
if(!$ticket){
// Ticket was rejected.
throw new Exception("Ticket rejected by API: " . print_r($errors,true));
}