Create ticket with Attachment via API JSON | Community
Skip to main content
Debut
April 2, 2020

Create ticket with Attachment via API JSON

  • April 2, 2020
  • 1 reply
  • 0 views

 Hi all


I need help with creating a Freshdesk ticket with Attachment via API


I am able to create the REST API Ticket but only the Attachment is not working


I am using JSON Content Type and it is not working,.


I am using this:


{

"attachments":["0","FD API.rtf"]

}


But it is not working.


I am getting this error:


{"description":"Validation failed","errors":[{"field":"{\"attachments\":","message":"Unexpected/invalid field in request","code":"invalid_field"}]} CODE: 400


    This topic has been closed for replies.

    1 reply

    Participating Frequently
    September 7, 2020

    Hi Elias,


    Apologies for the delay in getting back. The API request for ticket creation with attachment should have the Content type as Multipart/ Form-Data. Refer to this link to get detailed insights on the same. If you still face any discrepancy, please drop an email to support@freshdesk.com and we would be happy to help!


    Cheers. :)