I am using PHP CURL to call the create ticket endpoint on the new V2 APIs. I am creating tickets using the POST /api/v2/tickets endpoint. I am able to create new tickets as long as I don't include the cc_emails key in the parameters I send to the API. The following params work:
$params = array(
'email' => $email,
'subject' => $subject,
'description' => $description,
'priority' => $priority,
'status' => 2
);
But as soon as I add the cc_emails key / value pair, I get a 500 message from the Freshdesk servers:
$params = array(
'email' => $email,
'subject' => $subject,
'description' => $description,
'priority' => $priority,
'status' => 2,
'cc_emails' => array('peter@pointivo.com')
);
The same error occurs if I try to add custom_fields to the parameters
$params = array(
'email' => $email,
'subject' => $subject,
'description' => $description,
'priority' => $priority,
'status' => 2,
'custom_fields' => array('user_id' => 1)
);
What's the right syntax to use in these scenarios?