Urgent: Facing issue while uploading fax document through api

I am trying to upload fax document(pdf) through api and getting the success code with the below response

:{"correlationId":"3c51ec65-2380-4e4e-aea9-7959bf046042"}

but I am unable to see the uploaded document.

Request code:

HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setHeader('Authorization', 'Bearer ' + listApp[0].Access_Token__c);
req.setHeader('content-type', HttpMultipartFormDataManager.GetContentType());
//req.setEndpoint(listApp[0].Upload_Destination_URL__c);
req.setEndpoint('https://apps.usw2.pure.cloud/uploads/v2/outboundfax/c047594e-e812-40f7-a148-ecb34d71bc86');
String body = '';
body += HttpMultipartFormDataManager.WriteBoundary();
body += HttpMultipartFormDataManager.WriteBlobBodyParameter('pdffile.pdf',EncodingUtil.base64Encode(contVer.VersionData), 'file1.pdf');
Blob formBlob = EncodingUtil.base64Decode(body);
req.setHeader('Content-Length', String.valueOf(formBlob.size()));

 	req.setBodyAsBlob(formBlob);

    Http http = new Http();
    HttpResponse res = http.send(req);
    
    if (res.getStatusCode() == 200) {
        system.debug('Body::'+res.getBody());
    }

If you are getting a successful response but the server is not performing the desired action, please open a case with Genesys Cloud Care as we do not have access to your org's data to investigate via the forum.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.