<notes>
<helpdesk-note>
<body_html>
<body><html><a href="http://linkto.example.com">Link to example.com</a></html></body>
</body_html>
</helpdesk-note>
</notes>
Its not possible to add a note while creating a new Ticket via API, because the Ticket ID field would be needed, to which the note is to be added
If an agent wants to add the comment please use the below xml
curl -u sample@freshdesk.com:test -H "Content-Type: application/xml" -d "<helpdesk_note><body>Notes From User</body></helpdesk_note>" -X POST http://sample.freshdesk.com/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
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://sample.freshdesk.com/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://sample.freshdesk.com/helpdesk/tickets/{ticket-display-id}/notes/{note-id}.xml
regards
Vijay
Update : You can view our latest API documentation here : https://developer.freshdesk.com/api/#create_ticket
Cheers!
Sign in to the Community
Social Login
Login for Freshworks Employees Login with LinkedInEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.