API, possible to sort tickets?

  • 15 January 2014
  • 8 replies

I would like to use the API to pull recently modified/updated tickets (they appear to be sorted by date created).  I cant find anything in the API documentation or support forums but is this possible?

This topic has been closed for comments

8 replies

I have the same issue

Userlevel 4
Badge +12


By default, the query that is used to return a list of tickets will fetch tickets based on created time . You could have a custom filter that will display the last updated tickets in the list view and then perform the API query to obtain the list of tickets based on this filter.

Create a custom filter as described in the screenshot below :

You could use the following query to obtain the list of tickets based on this filter.

curl -u user@yourcompany.com:test -H "Content-Type: application/json" -X GET http://domain.freshdesk.com/helpdesk/tickets//helpdesk/tickets/view/[view_id]?format=json?format=json&page=1


Thanks for your reply =)

I figure this out by requesting all tickets, then by sorting them after with a loop because the script I'm making has to be automatic, so I can't create custom filter graphically.

And I can't create a custom filter with the API, right ?

Is there a way to create view showing "customer responded" only ?


Userlevel 4
Badge +12

@Elo : Unfortunately,only the data can be fetched from the pre-defined views using API but it is not possible to create a view on the fly.

@John: There's no explicit option to achieve this ( We're working on this enhancement ) . However, as a workaround you can create multiple observer rules to achieve this. Watch out for the email that helps you to set this up :)



@Aravind S: please send me the workaround solution to view only "customer responded" tickets as I have the same requirement to John. Thanks!

Userlevel 4
Badge +12

Hello Cathy,

I've just emailed you the workaround. Let me know if you need any further assistance.


Userlevel 4
Badge +12


We've now released the option to filter tickets via API without having to create a custom view. Here's the link to the documentation :https://developer.freshdesk.com/api/#filter_tickets