I’m trying to filter tickets that were created by e-mail, but in the documentation, it isn’t very clear on how or if it can be done. I know that there is a field in the ticket called “source”, which refers to what channel the ticket was created through, so i tried to used it.
I tried to do the following request:
As in the documentation, “source:1” should refer to the e-mail.
but the response was:
"description": "Validation failed",
"message": "Unexpected/invalid field in request",
It looks like the field “source” doesn’t exists, so how can I do this filter? Is there another field that I can use to do this?
As of I know, There is no straightforward solution to achieve this as only certain ticket fields are supported in the ticket search API. Refer to the below image for supported ticket fields in search API.
Maybe, one possible solution which I could think of now is to traverse through all the tickets and pick only the tickets which have the expected source using the get tickets API.
tickets API: https://domain.freshdesk.com/api/v2/tickets?page=1
Kindly take a look at this document for more reference
Filter tickets based on the following requester email (firstname.lastname@example.org) which needs to be URL encoded.
curl -v -u yourapikey:X -X GET 'https://domain.freshdesk.com/api/v2/tickets?email=super%2Bman%40gmail.com'
I hope this will solve your problem
@Santhosh Seems like @Matheus_Souza_Silva wants to filter tickets by source (i.e tickets created by email. ticket source should be email) but https://domain.freshdesk.com/api/v2/tickets?email=super%2Bman%40gmail.com will filter tickets using the given email.