Skip to main content
Files downloaded during a workflow session are stored in Simplex’s cloud. There are three ways to download files with Simplex: webhooks, polling, and the download session files endpoint.

Webhooks and polling

Both webhooks and polling for status offer presigned downloaded URLs you can use. See Webhooks and Polling Session Status for more information.

Download session files endpoint

You can alternatively download the files directly using either the download session files endpoint. or the TypeScript SDK. Here’s a TypeScript SDK example:
const zipBuffer = await client.downloadSessionFiles(workflow.sessionId);
const zipPath = path.resolve(__dirname, `${workflow.sessionId}_files.zip`);
fs.writeFileSync(zipPath, zipBuffer);
console.log(`Zip file saved to: ${zipPath}`);