Skip to main content

Is it possible to add a note to an existing ticket via the API?  If it is possible, could you give some pointers or example code?

Hi Tineke,

Thanks to my developer - Here it goes

curl -u sample@freshdesk.com:test -H "Content-Type: application/xml" -d "<helpdesk_note><body>Notes From User</body></helpdesk_note>" -X POST http://abc.freshdesk.co/helpdesk/tickets/{ticket-display-id}/notes.xml

If you want to add the comment on behalf of the user please use his user_id as below (user_id can be taken from Customers -> Contacts section

curl -u sample@freshdesk.com:test -H "Content-Type: application/xml" -d "<helpdesk_note><user_id>52</user_id><body>Notes From User</body></helpdesk_note>" -X POST http://demo.freshdesk.co/helpdesk/tickets/{ticket-display-id}/notes.xml

If you want to update a particular note (Note: You need to use body_html attribute in this case)

curl -u sample@freshdesk.com:test -H "Content-Type: application/xml" -d "<helpdesk_note><body_html>Dummy duty</body_html></helpdesk_note>" -X PUT http://demo.freshdesk.co/helpdesk/tickets/{ticket-display-id}/notes/{note-id}.xml



regards
Vijay


Yep, that does it.  Fantastic!  Thank you very much


Here's the latest documentation on the API - developer.freshdesk.com/api






Cheers!