How I am currently doing this is, sending a raw JSON through Postman. This JSON is used to create a Case record in Salesforce. In order to attach a file to that case, the JSON contains a base64 encoded file content, which could be used for attachment.

When I send a multipart/form-data, postman throws

You have sent us an Illegal URL or an improperly formatted request.

I also remember reading somewhere that Apex REST does not support multipart/form-data requests.

Is there any workaround for this?

  • Looking around, I found this link, see if that helps.
    – Jayant Das
    Oct 12, 2018 at 13:03
  • What API you are using? Is it standard API or custom API?
    – Saroj Bera
    Oct 12, 2018 at 18:07


You must log in to answer this question.

Browse other questions tagged .