Full example of a Create Ticket API post

  • 2 April 2014
  • 2 replies
  • 537 views

Hi all.


We're new to FreshDesk and wanting to take advantage of the Create Ticket API.


We've mapped fields from our contact us form on a web app over to the Fresh Desk API's, being careful to follow the documentation at: http://freshdesk.com/api/#ticket.


However, we are having some issues getting the ticket to be created.


Could someone share a full example of a Create Ticket post?  The examples in the API documentation are somewhat limited and do not include a lot of the fields that are available.


Any help would be greatly appreciated.


Thanks,

Eric



This topic has been closed for comments

2 replies

I am trying to create a ticket too. From my website. But there are some limitations in Freshdesk API.
The API does not allow cross domain request.


There is a project in ruby that can do it, what we want. But, I dont know if it can help me.

But, answers your question.


https://github.com/freshdesk/fresh-samples


If in this time that you create this ticket here, you build somthing to create a new ticket in your freshdesk, please let me know.


thank you,

Bruno Gomes.

Hi Bruno:


We are happy to inform that Freshdesk APIs now support CORS requests. A sample html is attached with this mail, with default field values as inputs for creating a ticket. Note that if you wish to update custom field values, you need to pass the field name instead of the display name. The custom field names in your portal can be obtained from any ticket_id in the following URL:


https://<your_freshdesk_domain>.freshdesk.com/helpdesk/tickets/<ticket_id>.json


The custom field values will be mapped to "custom_field" json key in the above URL. Please replace appropriate values for <your_freshdesk_domain> & <your_api_key> placeholders in the attached sample.html file. Do try out the sample code and get back to us if you have any other enquiry.


Thanks,




photo

Prasanna Balaraman
Customer Success Enthusiast


m: +91-9940112996 | e: prasanna@freshdesk.com | w:www.freshdesk.com