Getting 400 error when using Jira Service Desk APi to create Attachment

I am using JSM rest api to create tickets. I use “/servicedeskapi/request/xxx/attachment” and sending the temporary file Ids and its throwing 400 error, but not always most of the request are success and some are failing and returning 400 ,
One of the failed request is given below , but when i tried the same request with same payload in POSTMAN it went through and attachments got added to the ticket.

POSTMAN request:

POST https://*****/rest/servicedeskapi/request/xxx/attachment
Authorization: Basic *******


Note: Im not getting 400 everytime but some time it throws 400
Is there any limit in which we can invoke these api’s?