Zendesk API PHP implementation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.md Update README.md Oct 31, 2013
zendesk.php Update zendesk.php Oct 31, 2013



Basic Zendesk API PHP implementation

use as follow

$zendesk = new Zendesk($apiKey, $user, $subDomain, $suffix = '.json', $test = false);
$arr 	 = array("z_subject"=>"Help, my printer is on fire!",
	   "z_description"=>"help I need some help",
$create  = json_encode(array('ticket' => array('subject' => $arr['z_subject'], 'description' => $arr['z_description'], 'requester' => array('name' => $arr['z_name'], 'email' => $arr['z_requester']))), JSON_FORCE_OBJECT);
$data    = $zendesk->call("/tickets", $create, "POST");

print $data->ticket->id;

You're done !

Credits to Adam https://support.zendesk.com/entries/21462093-php-and-zendesk-quick-start-guide and Darren Scerri https://github.com/darrenscerri