Introduction

The Freshdesk REST API allows you to interact with your helpdesk: connect to the helpdesk, populate data, extract data into other applications and even develop your applications to integrate with your Freshdesk helpdesk.

The API is implemented using plain XML with all the REST commands: GET, PUT, POST and DELETE. These APIs allow you to read, modify, add and delete data in your Freshdesk helpdesk. Tickets, Users, Forums and Solutions are the resources in the helpdesk that can be manipulated using the APIs.



Viewing via API

All GET requests can be viewed in the XML format over a web browser. Most of the Freshdesk URLs can be viewed as XML simply by adding the '.xml' extension to the URL. e.g. to see the XML version of /helpdesk/contacts you will use /helpdesk/contacts.xml. You can also use cURL (a good open source tool is hurl) to view all Freshdesk REST API requests.



Authentication

Freshdesk uses HTTP Basic Authentication. You do not need a special API key nor a separate user to access the Freshdesk APIs. Your Freshdesk username and password is the only authentication needed to access the Freshdesk APIs, which also means that you will be restricted to only accessing the data enabled on your Freshdesk user profile. Below is an example of an authenticated GET request implemented using cURL

curl -u {sampleagent@freshdesk.com}:{password} 
http://{yourhelpdesk}.freshdesk.com/helpdesk/tickets.xml
		



Writing via API

Use cURL to modify Freshdesk data via API. Adding or modifying data in Freshdesk is done by pushing data in the XML format. So for any PUT or POST request, you need to have -H "Content-Type: application/xml" appended before the API request. Below is an example of an authenticated, POST request that creates a ticket

curl -u {sampleagent@freshdesk.com}:{test} -H "Content-Type: application/xml" -d 
“<helpdesk_ticket><description>{Test}</description>
<email>{yourcustomer@customerscompany.com}</email></helpdesk_ticket>" -X POST
http://{yourhelpdesk}.freshdesk.com/helpdesk/tickets.xml



Conventions

The below are naming conventions used throughout this API documentation:

  • {text}: represents text that you will need to replace with your own
  • ...: represents truncated text for brevity in documentation