Skip to main content
Debut
Apr 2, 2020 1:33 PM UTC

Create ticket with Attachment via API JSON

 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
    Sep 7, 2020 9:11 PM UTC

    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. :)