Adding audio record to call log

I’m trying to attach an audio file to an activity but I am keep getting Invalid multipart payload format error response. Request example:

The same request works in postman, could you help me?

Hi @Alexander
Welcome to the community :wave:
Can you share the complete error message? The following snippet should work fine with Unirest

var unirest = require('unirest');
var req = unirest('POST', '<call_log_id>/recordings')
    'Accept': 'application/json',
    'Authorization': 'Bearer <Token>'
  .attach('file', 'audio.wav')
  .end(function (res) {
    if (res.error) console.log(res.error);

@Hem Can you help me with my php code for the same ?

Hi @Shubham
One of the nifty features of our Postman collection is that it also generates runtime specific code snippets -

would this help ? Let me know :slight_smile:

@Hem actually I know that postman provides code for the request however , I don’t want to upload a single file , but multiple files to different deals , so I have to make it dynamic , so I don’t want to use postman since it includes cookies