Creating Tickets through the api with ajax
Am I right in thinking that it is not possible to use ajax to hit the zendesk api to create tickets?
My use case is that my app has a public wordpress site, which contains a support form from which my customers can submit a support request. I want to collect the data from the form and post against the zendesk api to create a support ticket. It seems like this is not possible and I need to use something like curl server side. Can anyone confirm this?
-
Actually, it is possible to use AJAX to hit the Zendesk API (including for ticket creation). Doing so is most clearly laid out in our Zendesk Apps documentation, specifically in the article about Requests.
If you take a look at this article, and still have any questions or problems, please feel free to send us an email at support@zendesk.com and we will be happy to help you out!
-
Hi, good day, the article about Requests doesn't exist, Can you help me with something link that be good?
Thanks for your help Joe Kramer
-
Sorry about that, John. Since that post is over 3 years old, that article has been archived. I'll see if we can find you a more current version that we can link you to.
-
HI John -
Here's an article which has some examples on using AJAX to hit Zendesk's API. Let us know if that answers your question, or if you need further assistance.
-
Hi Nicole,
This article shows how to create a ticket from Agent's browser console. I.e. user is already logged in as an agent and creates tickets.
The initial question was how to create a ticket with an ajax request from my web page. I.e. as a customer who does not logged in.
It's similar to the Web Widget. But I do not want to use it. I want to use my UI to submit a ticket to support instead of using of Web Widget.
Thanks -
Hey Armen,
If you'd like a user to submit a ticket from your own website, you'd need to build a custom form that sends over the ticket data to your Support account. I would recommend using the following article to assist with setting this up:
Building a custom ticket form with the Zendesk API
By setting up this form the user should not be required to log in first which I believe is what you're looking for.
Let me know if you have any other questions!
-
Thanks!
-
Happy to help Armen :)
Please sign in to leave a comment.
8 Comments