So I got it working already but it also shows all the tickets that are either marked as spam or deleted. I am using the following query in a PHP script:
"https://$yourdomain.freshdesk.com/api/v2/search/tickets?query=\"group_id:null%20AND%20agent_id:null%20AND%20status:2\""
What would I need to add to NOT show tickets marked as spam or that are deleted?
Any help is appreciated!