REST API Error 400 Bad Request

I’m working on a Salesforce - Jira integration. On Postman, the following request is successful:

URI: POST: {{baseUrl}}/rest/api/3/search


  "jql": "key in (\"BEW-1111\",\"BEW-1112\")",
  "startAt": "0",
  "maxResults": "2",
  "fields": [

When I try the same request from Salesforce, I get the error:
{“errorMessages”:[“Invalid request payload. Refer to the REST API documentation and try again.”]}
I had success with a similar request in Salesforce using the GET method with the JQL on the URI and an empty body.
So, what’s the issue? Why can’t I do an API search with the POST method from Salesforce? Any help would be appreciated.
Tim Szczesuil

Welcome to the Atlassian developer community @TimothySzczesuil,

I confirm that error is coming from Jira so we know that Salesforce is making the request. But I wonder exactly how that request is making it’s way through Salesforce with the double-quote escaping (\"). Maybe drop those since quoting is only necessary in JQL to help with the interpretation of spaces? "key in (BEW-1111, BEW-1112)" should work.

I’ve tried a lot of different body/data:
{“jql”: “key=BEW-1111”}
{“jql”: “project=BEW”}
They all work in Postman but not Salesforce. I don’t think it’s the contents of the payload, there’s something else going on. I’ve also tried with and without serializing the JSON payload.