Sending attachments using Freshdesk API

We are trying to send images as an attachment using API from Freshdesk. We want to create a new ticket along with multiple attachments. Getting the following error message when trying to implement the code from Github:

Message could not be sent. Mailer Error: {“description”:“Validation failed”,“errors”:[{“field”:“attachments”,“message”:“Unexpected/invalid field in request”,“code”:“invalid_field”}]}

Request help with the same

Hi @Surajit_Chaudhuri,
Good day! Welcome to the community!

can you please take a look at this document for more reference?

https://developers.freshdesk.com/api/#create_ticket_with_attachment

Thanks

Do you mind sharing the code that you used?

I am also facing the same issue.
While i am trying to hit the api for attachments i have tried sending it form my local file system as well as via a link but i get the same response. please help.
response - when i hit the request with correct basic auth and domain
{
“description”: “Validation failed”,
“errors”: [
{
“field”: “attachments”,
“message”: “It should contain elements of type valid file format only”,
“code”: “datatype_mismatch”
}
]
}

I am also facing the same issue while uploading attachment.
Please reply for any solution