Question

How can I create a Zendesk ticket with a subject using a URL?

We have a customer support center using Zendesk. We also have a VoIP phone system that can fire off a URL when a call comes in. I understand that using the Zendesk API I can create tickets, but to do that I need to authenticate using JSON. My VoIP system doesn't have that option so I would have to build a web app that takes in a URL and converts it in to a secure JSON connection. Instead, I'd like to have our agents logged in to Zendesk and then have the phones launch a simple URL with the caller ID upon incoming call.

In Zendesk I see this URL:

https://mydomain.zendesk.com/agent/#/tickets/new/1

But I haven't found any documentation regarding adding a subject and/or description.

What URL can I use to create a new Zendesk ticket and supply arguments (using a GET request) to fill out the subject and/or message?

Was it helpful?

Solution

In general, it isn't possible with a GET request. Their API requires POST http://developer.zendesk.com/documentation/rest_api/tickets.html#creating-tickets

What I would do is host a server/application on a network server that has a simple API - django has simple URL parsing. The phone would create a URL like this yourinternaldomain.org/ticketspawner/create/[number]/name/[caller_id_name]

The app parses [number] and [caller_id_name] from the URL and can create a new ticket based on the phone number and caller_id_name (perhaps you want to create the user first). You can use python or curl or whatever you like.

From their page:

curl https://{subdomain}.zendesk.com/api/v2/tickets.json \
-d '{"ticket":{"requester":{"name":"The Customer", "email":"thecustomer@domain.com"},
"submitter_id":410989, "subject":"My printer is on fire!", "comment": { "body": 
"The smoke     is very colorful." }}}' \
-H "Content-Type: application/json" -v -u {email_address}:{password} -X POST
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top