Solved

Sending attachment issue

  • 31 January 2024
  • 1 reply
  • 94 views

Hello,

I started getting this error out of blue today while sending an attachment via the messages endpoint:

{"_error":{"status":400,"title":"Bad request","message":"Body did not satisfy requirements","details":["body.body: missing"]}}

 

The code that I am using to send the message and attachment hasn’t been changed in months and was working since this morning. 

Any idea why this would start happening all of the sudden?

 

This is the request that i am sending:

 

POST: .....messages
Content-Type: multipart/form-data; boundary=----------------------------8dc226f5fd04b07
Accept: application/json
Authorization: Bearer ****
Host: api2.frontapp.com
Content-Length: 99953
Expect: 100-continue
Connection: Keep-Alive


------------------------------8dc226f5fd04b07
Content-Disposition: form-data; name="subject";

Test FRONT app integration
------------------------------8dc226f5fd04b07
Content-Disposition: form-data; name="body";

This should have an attachment
------------------------------8dc226f5fd04b07
Content-Disposition: form-data; name="to[0]";

emailaddress@123.com
------------------------------8dc226f5fd04b07
Content-Disposition: form-data; name="attachments[0]"; filename="test.pdf"
Content-Type: application/pdf

<PDF DATA>
------------------------------8dc226f5fd04b07--

icon

Best answer by jason 31 January 2024, 21:35

View original

1 reply

Userlevel 3
Badge +7

Thanks for the report - we’re taking a look

Reply