CRM Lead to Desk Via API

CRM Lead to Desk Via API

I'm trying to create a new ticket in desk when a new lead is created in the "Leads" module using a custom function in Workflow. I'm using the Desk API and postURL function to do this, but keep getting the following error message:
  1. {
  2.     "responseText":
  3.     {
  4.         "errorCode": "UNSUPPORTED_MEDIA_TYPE",
  5.         "message": "The given content type is not supported. Please provide the input Content-Type as application/json"
  6.     },
  7.     "responseCode": 415
  8. }
And here is my code:
  1. lead = zoho.crm.v1.getRecordById("Leads", leadID);
  2. company = lead.get("Company");
  3. leadName = lead.get("Lead Name");
  4. email = lead.get("Email");
  5. phone = lead.get("Phone");
  6. interestedIn = lead.get("Interested In");
  7. eventName = lead.get("Event Name");
  8. checkInDate = lead.get("Check In Date");
  9. checkOutDate = lead.get("Check Out Date");
  10. numberRoomsNeeded = lead.get("Number of Rooms Needed");
  11. roomType = lead.get("Room Type");
  12. subject = "Reservation Inquiry";
  13. departmentId = xxxxxx;
  14. contactId = xxxxxx;
  15. dataString = "Company: " + company + " Lead Name: " + leadName + " Intersted In: " + interestedIn + " Event Name: " + eventName + " Check In Date: " + checkInDate + " Check Out Date: " + checkOutDate + " Number of Rooms Needed: " + numberRoomsNeeded + " Room Type: " + roomType;

  16. header = map();
  17. header.put("Content-Type", "application/json;charset=UTF-8");

  18. data = {
  19. "subCategory": "",
  20.     "productId": "",
  21.     "contactId": contactId,
  22.     "subject": subject,
  23.     "customFields": {
  24.         "Event Key": eventName,
  25.         "Contact Name": "Test Test"
  26.     },
  27.     "dueDate": "",
  28.     "departmentId": departmentId,
  29.     "channel": "Web",
  30.     "description": dataString,
  31.     "priority": "Low",
  32.     "classification": "",
  33.     "assigneeId": "",
  34.     "phone": phone,
  35.     "category": "General",
  36.     "email": email,
  37.     "status": "Open"
  38. };

  39. resp = postUrl("https://desk.zoho.com/api/v1/tickets?orgId=xxxxxxxx&authtoken=xxxxxxxxxx", data, header, false);

  40. info resp;
Can anyone tell me why this isn't working? When I use "info data" I get back valid json and am able to use that json with Postman to create the ticket with the API, just not as a custom function in the CRM. Any ideas?

Thank You