const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
folderId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fileIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
targetFolderId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
format: 'zip',
recursive: true,
delivery: 'library',
downloadName: '<string>'
})
};
fetch('https://convertly.sh/api/files/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));