Guest API file upload rejecting valid PDFs with 400 Bad Request

We’re trying to enable file attachments in our custom Web Messaging widget using the Guest API. The docs mention a specific endpoint for uploading files before creating the guest, so we’re hitting POST /api/v2/conversations/messaging/guests/files with a multipart/form-data payload. It works fine for small images under 1MB, but as soon as we push a 2.5MB PDF through, the server slaps back a 400 Bad Request. The response body is basically empty, just a generic error object that doesn’t tell us if it’s a MIME type issue or a hard cap on the file size. We’ve verified the Content-Type header is set correctly to application/pdf.

Here’s the snippet we’re using to construct the request body. We’re building the FormData object in Node.js and passing it directly to axios. Is there a silent size limit on the guest file upload endpoint that isn’t documented, or are we missing a specific header that tells Genesys to accept larger binary blobs? We’ve tried tweaking the maxBodyLength in the axios config but that’s just a client-side limit. The server rejects it regardless.

const formData = new FormData();
formData.append('file', fs.createReadStream('./test.pdf'), {
 filename: 'test.pdf',
 contentType: 'application/pdf'
});

axios.post('https://api.mypurecloud.com/api/v2/conversations/messaging/guests/files', formData, {
 headers: {
 ...formData.getHeaders(),
 'Authorization': `Bearer ${token}`
 }
});