Upload files to environments for persistent access, or upload standalone files for temporary use
When your agent needs to work with files (submitting a PDF to a form, importing a spreadsheet, or uploading an image) you upload them first and then reference them by fileId in your tasks.Files can be uploaded in two modes:
Mode
Behavior
Persistent
Attached to an environment. Available to any session on that environment. Only deleted when you explicitly remove them.
Orphan
No environment attached. Automatically deleted after 1 hour. Can be promoted to an environment later.
Upload to an Environment (Persistent)
Include environmentId in the form data to attach the file permanently to an environment. Any session using that environment can access the file at any time.
An orphan file is automatically promoted to an environment when you pass its fileId in a session or task that also includes an environmentId. Once the session runs, the file is persisted to that environment and won’t expire.
Upload Response Fields
Field
Type
Description
success
boolean
Whether the upload succeeded
files
array
Array of uploaded file metadata
files[].fileId
string
Unique identifier: use this to reference the file in tasks
files[].originalName
string
Original filename as uploaded
files[].size
number
File size in bytes
Uploading Multiple Files
Repeat the files field to upload several files in one request:
Reference uploaded files by fileId when starting a task. Pass them in the files array alongside environmentId to use the environment’s browser profile and persist orphan files at the same time.
With /start/run-task
curl -X POST https://api.webrun.ai/start/run-task \ -H "Authorization: Bearer wr_xxx" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Open the uploaded spreadsheet and extract the data", "environmentId": "<ENV_ID>", "files": ["<FILE_ID>"] }'
Include files in the message object when sending a newTask action:
{ "sessionId": "a1b2c3d4e5f6", "message": { "actionType": "newTask", "newState": "start", "prompt": "Upload the attached spreadsheet to the data import page", "startingUrl": "https://example.com/import", "files": ["ghi789..."] }}
Complete Example
Upload an orphan file, then run a task with an environment; the file gets persisted automatically:
const API_KEY = process.env.WEBRUN_API_KEY;const ENV_ID = "<ENV_ID>";// Step 1: Upload the file (orphan, no environmentId yet)const formData = new FormData();formData.append("files", fs.createReadStream("report.pdf"));const uploadResponse = await fetch("https://api.webrun.ai/files/upload", { method: "POST", headers: { "Authorization": `Bearer ${API_KEY}` }, body: formData}).then(r => r.json());const fileId = uploadResponse.files[0].fileId;// Step 2: Run a task with the environment and file// The orphan file is promoted to the environment automaticallyconst taskResponse = await fetch("https://api.webrun.ai/start/run-task", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${API_KEY}` }, body: JSON.stringify({ prompt: "Go to the upload page and submit the attached PDF report", startingUrl: "https://example.com/submit", environmentId: ENV_ID, files: [fileId] })}).then(r => r.json());console.log(taskResponse);
Managing Environment Files
List or delete files attached to an environment using the Environments API:
# List all files in an environmentcurl https://api.webrun.ai/environments/<ENV_ID>/files \ -H "Authorization: Bearer wr_xxx"# Delete a specific filecurl -X DELETE https://api.webrun.ai/environments/<ENV_ID>/files/<FILE_ID> \ -H "Authorization: Bearer wr_xxx"
Endpoint Reference
Endpoint
Field
Location
POST /files/upload
files (multipart)
Form data
POST /files/upload
environmentId
Form data (optional: omit for orphan upload)
POST /start/run-task
files
Request body
POST /start/run-task
environmentId
Request body
POST /start/start-session
files
Inside task object
POST /start/send-message
files
Inside message object
GET /environments/<ENV_ID>/files
—
List files in an environment
DELETE /environments/<ENV_ID>/files/<FILE_ID>
—
Delete a file from an environment
Related
Environments API
Create environments and manage attached files
Environments Overview
What environments are and when to use them
Secrets
Provide credentials for authenticated sessions
Webhooks
Get notified when tasks complete
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"WebRun Documentation","colors":{"primary":"#0037B9","light":"#015cbd","dark":"#003d9d"},"logo":{"light":"https://mintcdn.com/enigma-ba07d905/a4b0oUzEgeOSUAqm/logo/light.svg?fit=max\u0026auto=format\u0026n=a4b0oUzEgeOSUAqm\u0026q=85\u0026s=e262b8d2fb8a97757b474f11cfb63ad7","dark":"https://mintcdn.com/enigma-ba07d905/a4b0oUzEgeOSUAqm/logo/dark.svg?fit=max\u0026auto=format\u0026n=a4b0oUzEgeOSUAqm\u0026q=85\u0026s=33d3dd020c50a4a7eb00326b0fa5cefc"},"favicon":"https://mintcdn.com/enigma-ba07d905/a4b0oUzEgeOSUAqm/favicon.svg?fit=max\u0026auto=format\u0026n=a4b0oUzEgeOSUAqm\u0026q=85\u0026s=9e38ea8ee5e0980665fcafdf14703227","navbar":{"links":[{"href":"mailto:support@webrun.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.webrun.ai"}},"footer":{"socials":{"x":"https://x.com/webrun","github":"https://github.com/webrun-ai"}},"integrations":{"ga4":{"measurementId":"G-ZKXTFGN51V"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"enigma-ba07d905","hasAudioNarration":false,"actualSubdomain":"enigma-ba07d905","customDomains":["docs.webrun.ai"],"gitSource":{"type":"github","owner":"magedgamani","repo":"engima-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6a8c5d242b221184bd09d90e","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"default","tag":"Documentation","count":39},{"language":"default","tag":"Usage Guides","count":10},{"language":"default","tag":"Concepts","count":7},{"language":"default","tag":"Environments","count":6},{"language":"default","tag":"API Reference","count":4},{"language":"default","tag":"Getting Started","count":4},{"language":"default","tag":"Integrations","count":4},{"language":"default","tag":"Troubleshooting","count":3},{"language":"default","tag":"Capabilities","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"environments/file-uploads","slug":"/environments/file-uploads","pageMetadata":{"title":"File Uploads","description":"Upload files to environments for persistent access, or upload standalone files for temporary use","icon":"file-arrow-up","href":"/environments/file-uploads"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Upload files to environments for persistent access, or upload standalone files for temporary use\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Accordion,Card,CardGroup,CodeBlock,Heading,Table,Tip}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`When your agent needs to work with files (submitting a PDF to a form, importing a spreadsheet, or uploading an image) you upload them first and then reference them by `,_jsx(_components.code,{children:`fileId`}),` in your tasks.`]}),`\n`,_jsx(_components.p,{children:`Files can be uploaded in two modes:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Persistent`})}),_jsx(_components.td,{children:`Attached to an environment. Available to any session on that environment. Only deleted when you explicitly remove them.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Orphan`})}),_jsxs(_components.td,{children:[`No environment attached. Automatically deleted after `,_jsx(_components.strong,{children:`1 hour`}),`. Can be promoted to an environment later.`]})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`upload-to-an-environment-persistent`,children:`Upload to an Environment (Persistent)`}),`\n`,_jsxs(_components.p,{children:[`Include `,_jsx(_components.code,{children:`environmentId`}),` in the form data to attach the file permanently to an environment. Any session using that environment can access the file at any time.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST https://api.webrun.ai/files/upload \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer wr_xxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@/path/to/sample.zip\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"environmentId=\u003cENV_ID>\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Response:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fileId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc123...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"originalName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sample.zip\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`204800`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`upload-without-an-environment-orphan`,children:`Upload Without an Environment (Orphan)`}),`\n`,_jsxs(_components.p,{children:[`Omit `,_jsx(_components.code,{children:`environmentId`}),` to upload a standalone file. It is automatically deleted after 1 hour unless promoted to an environment.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST https://api.webrun.ai/files/upload \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer wr_xxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@/path/to/sample.zip\"`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`An orphan file is automatically promoted to an environment when you pass its `,_jsx(_components.code,{children:`fileId`}),` in a session or task that also includes an `,_jsx(_components.code,{children:`environmentId`}),`. Once the session runs, the file is persisted to that environment and won’t expire.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`upload-response-fields`,children:`Upload Response Fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`success`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Whether the upload succeeded`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`files`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Array of uploaded file metadata`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`files[].fileId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Unique identifier: use this to reference the file in tasks`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`files[].originalName`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Original filename as uploaded`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`files[].size`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`File size in bytes`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`uploading-multiple-files`,children:`Uploading Multiple Files`}),`\n`,_jsxs(_components.p,{children:[`Repeat the `,_jsx(_components.code,{children:`files`}),` field to upload several files in one request:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST https://api.webrun.ai/files/upload \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer wr_xxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@document.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@photo.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@spreadsheet.xlsx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"environmentId=\u003cENV_ID>\"`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`using-files-in-a-session`,children:`Using Files in a Session`}),`\n`,_jsxs(_components.p,{children:[`Reference uploaded files by `,_jsx(_components.code,{children:`fileId`}),` when starting a task. Pass them in the `,_jsx(_components.code,{children:`files`}),` array alongside `,_jsx(_components.code,{children:`environmentId`}),` to use the environment’s browser profile and persist orphan files at the same time.`]}),`\n`,_jsx(Heading,{level:`3`,id:`with-/start/run-task`,children:`With /start/run-task`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST https://api.webrun.ai/start/run-task \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer wr_xxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Open the uploaded spreadsheet and extract the data\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"environmentId\": \"\u003cENV_ID>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"files\": [\"\u003cFILE_ID>\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`with-/start/start-session`,children:`With /start/start-session`}),`\n`,_jsxs(_components.p,{children:[`Include `,_jsx(_components.code,{children:`files`}),` inside the `,_jsx(_components.code,{children:`task`}),` object:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"default\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"environmentId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cENV_ID>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"task\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Process the attached report\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startingUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/dashboard\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc123...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`with-/start/send-message`,children:`With /start/send-message`}),`\n`,_jsxs(_components.p,{children:[`Include `,_jsx(_components.code,{children:`files`}),` in the `,_jsx(_components.code,{children:`message`}),` object when sending a `,_jsx(_components.code,{children:`newTask`}),` action:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1b2c3d4e5f6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"actionType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"newTask\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"newState\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"start\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Upload the attached spreadsheet to the data import page\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startingUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/import\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ghi789...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`complete-example`,children:`Complete Example`}),`\n`,_jsx(_components.p,{children:`Upload an orphan file, then run a task with an environment; the file gets persisted automatically:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`32`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`32`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` API_KEY = process.env.WEBRUN_API_KEY;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ENV_ID = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cENV_ID>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Step 1: Upload the file (orphan, no environmentId yet)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` formData = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FormData();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`formData.append(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, fs.createReadStream(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"report.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uploadResponse = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.webrun.ai/files/upload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Bearer ${API_KEY}`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: formData`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}).then(r => r.json());`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fileId = uploadResponse.files[0].fileId;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Step 2: Run a task with the environment and file`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The orphan file is promoted to the environment automatically`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` taskResponse = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.webrun.ai/start/run-task\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Bearer ${API_KEY}`\"})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prompt: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Go to the upload page and submit the attached PDF report\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` startingUrl: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/submit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` environmentId: ENV_ID,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` files: [fileId]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}).then(r => r.json());`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`console.log(taskResponse);`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`managing-environment-files`,children:`Managing Environment Files`}),`\n`,_jsxs(_components.p,{children:[`List or delete files attached to an environment using the `,_jsx(_components.a,{href:`/environments/environments-api`,children:`Environments API`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# List all files in an environment`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` https://api.webrun.ai/environments/\u003cENV_ID>/files \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer wr_xxx\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Delete a specific file`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X DELETE https://api.webrun.ai/environments/\u003cENV_ID>/files/\u003cFILE_ID> \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer wr_xxx\"`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint-reference`,children:`Endpoint Reference`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Endpoint`}),_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Location`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /files/upload`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`files`}),` (multipart)`]}),_jsx(_components.td,{children:`Form data`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /files/upload`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`environmentId`})}),_jsx(_components.td,{children:`Form data (optional: omit for orphan upload)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /start/run-task`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`files`})}),_jsx(_components.td,{children:`Request body`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /start/run-task`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`environmentId`})}),_jsx(_components.td,{children:`Request body`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /start/start-session`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`files`})}),_jsxs(_components.td,{children:[`Inside `,_jsx(_components.code,{children:`task`}),` object`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /start/send-message`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`files`})}),_jsxs(_components.td,{children:[`Inside `,_jsx(_components.code,{children:`message`}),` object`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /environments/\u003cENV_ID>/files`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`List files in an environment`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETE /environments/\u003cENV_ID>/files/\u003cFILE_ID>`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Delete a file from an environment`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Accordion,{title:`Related`,id:`related`,children:_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Environments API`,icon:`code`,href:`/environments/environments-api`,children:_jsx(_components.p,{children:`Create environments and manage attached files`})}),_jsx(Card,{title:`Environments Overview`,icon:`box`,href:`/environments/overview`,children:_jsx(_components.p,{children:`What environments are and when to use them`})}),_jsx(Card,{title:`Secrets`,icon:`key`,href:`/usage-guides/secrets`,children:_jsx(_components.p,{children:`Provide credentials for authenticated sessions`})}),_jsx(Card,{title:`Webhooks`,icon:`bell`,href:`/usage-guides/webhooks`,children:_jsx(_components.p,{children:`Get notified when tasks complete`})})]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"File Uploads","description":"Upload files to environments for persistent access, or upload standalone files for temporary use","icon":"file-arrow-up","href":"/environments/file-uploads"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Upload to an Environment (Persistent)","slug":"upload-to-an-environment-persistent","depth":2,"children":[]},{"title":"Upload Without an Environment (Orphan)","slug":"upload-without-an-environment-orphan","depth":2,"children":[]},{"title":"Upload Response Fields","slug":"upload-response-fields","depth":2,"children":[]},{"title":"Uploading Multiple Files","slug":"uploading-multiple-files","depth":2,"children":[]},{"title":"Using Files in a Session","slug":"using-files-in-a-session","depth":2,"children":[{"title":"With /start/run-task","slug":"with-/start/run-task","depth":3,"children":[]},{"title":"With /start/start-session","slug":"with-/start/start-session","depth":3,"children":[]},{"title":"With /start/send-message","slug":"with-/start/send-message","depth":3,"children":[]}]},{"title":"Complete Example","slug":"complete-example","depth":2,"children":[]},{"title":"Managing Environment Files","slug":"managing-environment-files","depth":2,"children":[]},{"title":"Endpoint Reference","slug":"endpoint-reference","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"enigma-ba07d905","siteName":"WebRun Documentation","title":"File Uploads - WebRun Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-08T03:43:28.726Z","originalFileLocation":"environments/file-uploads.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Upload files to environments for persistent access, or upload standalone files for temporary use\">\u003cmeta data-mint-head name=\"application-name\" content=\"WebRun Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"File Uploads - WebRun Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upload files to environments for persistent access, or upload standalone files for temporary use\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"WebRun Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.webrun.ai/environments/file-uploads\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://enigma-ba07d905.mintlify.site/_mintlify/api/og/v2?division=Environments\u0026amp;title=File+Uploads\u0026amp;description=Upload+files+to+environments+for+persistent+access%2C+or+upload+standalone+files+for+temporary+use\u0026amp;theme=1d6636492a7df386cea55dd7\u0026amp;signature=f44a006e32dd9a7e9dddd74063a143c089b9f1b3cb35d64ee9989657f692bfea\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"File Uploads - WebRun Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upload files to environments for persistent access, or upload standalone files for temporary use\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://enigma-ba07d905.mintlify.site/_mintlify/api/og/v2?division=Environments\u0026amp;title=File+Uploads\u0026amp;description=Upload+files+to+environments+for+persistent+access%2C+or+upload+standalone+files+for+temporary+use\u0026amp;theme=1d6636492a7df386cea55dd7\u0026amp;signature=f44a006e32dd9a7e9dddd74063a143c089b9f1b3cb35d64ee9989657f692bfea\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/enigma-ba07d905/fow82elHpEIWZCQG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"WebRun Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0037B9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.webrun.ai/environments/file-uploads\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/environments/file-uploads.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.webrun.ai/#organization\",\"name\":\"WebRun Documentation\",\"url\":\"https://docs.webrun.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/enigma-ba07d905/a4b0oUzEgeOSUAqm/logo/light.svg?fit=max\u0026auto=format\u0026n=a4b0oUzEgeOSUAqm\u0026q=85\u0026s=e262b8d2fb8a97757b474f11cfb63ad7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.webrun.ai#website\",\"name\":\"WebRun Documentation\",\"url\":\"https://docs.webrun.ai\",\"publisher\":{\"@id\":\"https://docs.webrun.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.webrun.ai/environments/file-uploads#webpage\",\"url\":\"https://docs.webrun.ai/environments/file-uploads\",\"name\":\"File Uploads\",\"description\":\"Upload files to environments for persistent access, or upload standalone files for temporary use\",\"dateModified\":\"2026-08-08T03:43:28.726Z\",\"isPartOf\":{\"@id\":\"https://docs.webrun.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.webrun.ai/environments/file-uploads#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.webrun.ai/environments/file-uploads#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Environments\",\"item\":\"https://docs.webrun.ai/environments/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"File Uploads\",\"item\":\"https://docs.webrun.ai/environments/file-uploads\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.webrun.ai/environments/file-uploads#article\",\"headline\":\"File Uploads\",\"name\":\"File Uploads\",\"description\":\"Upload files to environments for persistent access, or upload standalone files for temporary use\",\"url\":\"https://docs.webrun.ai/environments/file-uploads\",\"mainEntityOfPage\":{\"@id\":\"https://docs.webrun.ai/environments/file-uploads#webpage\"},\"dateModified\":\"2026-08-08T03:43:28.726Z\",\"publisher\":{\"@id\":\"https://docs.webrun.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.webrun.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"WebRun Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"WebRun Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/environments/file-uploads.md","siteName":"WebRun Documentation","nav":{"global":{"anchors":[]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Overview","icon":"house","href":"/getting-started/overview"},{"title":"Quickstart","icon":"bolt","href":"/getting-started/quickstart"},{"title":"Workflows: n8n, Make","icon":"diagram-project","href":"/getting-started/workflow-quickstart"},{"title":"MCP Quickstart","icon":"puzzle-piece","href":"/getting-started/mcp-quickstart"}]},{"group":"Concepts","pages":[{"title":"Sessions","icon":"window-restore","href":"/concepts/sessions"},{"title":"Tasks","icon":"list-check","href":"/concepts/tasks"},{"title":"Guardrails","icon":"shield-halved","href":"/concepts/guardrails"},{"title":"Automation Policies","icon":"shield-check","href":"/concepts/policies"},{"title":"Response Model","icon":"reply","href":"/concepts/response-model"},{"title":"Bot Identification","icon":"robot","href":"/concepts/bot-identification"},{"title":"Pricing \u0026 Costs","icon":"credit-card","href":"/concepts/pricing"}]},{"group":"Usage Guides","pages":[{"title":"Multi-Task Workflows","icon":"layer-group","href":"/usage-guides/multi-task-workflows"},{"title":"Controlling Sessions","icon":"sliders","href":"/usage-guides/controlling-sessions"},{"title":"Manual Interaction","icon":"hand-pointer","href":"/usage-guides/manual-interaction"},{"title":"Handling Guardrails","icon":"triangle-exclamation","href":"/usage-guides/handling-guardrails"},{"title":"Secrets","icon":"key","href":"/usage-guides/secrets"},{"title":"Proxies","icon":"globe","href":"/usage-guides/proxies"},{"title":"Video Streaming","icon":"video","href":"/usage-guides/video-streaming"},{"title":"Structured Output","icon":"code","href":"/usage-guides/structured-output"},{"title":"Webhooks","icon":"webhook","href":"/usage-guides/webhooks"},{"title":"Cost Optimization","icon":"piggy-bank","href":"/usage-guides/cost-optimization"}]},{"group":"Integrations","pages":[{"title":"REST API Integration","icon":"server","href":"/integrations/rest-api"},{"title":"WebSocket Integration","icon":"plug","href":"/integrations/websocket"},{"title":"OpenAI-Compatible API","icon":"robot","href":"/integrations/openai-compatible"},{"title":"MCP Server Reference","icon":"puzzle-piece","href":"/integrations/mcp-server"}]},{"group":"Environments","pages":[{"title":"Environments","icon":"box","href":"/environments/overview"},{"title":"Environments API","icon":"code","href":"/environments/environments-api"},{"title":"Triggers","icon":"bolt","href":"/environments/triggers"},{"title":"Browser Profiles","icon":"user-gear","href":"/environments/profiles"},{"title":"Profile Management API","description":"Upload, download, and manage browser profile data stored in environments","icon":"book","href":"/environments/profile-management-api"},{"title":"File Uploads","icon":"file-arrow-up","href":"/environments/file-uploads"}]},{"group":"API Reference","pages":[{"title":"Endpoints","description":"Complete reference for all WebRun API endpoints","icon":"route","href":"/api-reference/endpoints"},{"title":"Parameters","icon":"sliders","href":"/api-reference/parameters"},{"title":"Response Formats","icon":"file-code","href":"/api-reference/response-formats"},{"title":"Rate Limits","icon":"gauge-high","href":"/api-reference/rate-limits"}]},{"group":"Capabilities","pages":[{"title":"Supported Interactions","icon":"hand-pointer","href":"/capabilities/supported-interactions"}]},{"group":"Troubleshooting","pages":[{"title":"Error Codes Reference","icon":"circle-exclamation","href":"/troubleshooting/errors-reference"},{"title":"Common Issues \u0026 Solutions","icon":"bug","href":"/troubleshooting/common-issues"},{"title":"Frequently Asked Questions","icon":"circle-question","href":"/troubleshooting/faqs"}]}]}]},"basePath":"","title":"File Uploads - WebRun Documentation","deploymentId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","buildId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","dynamics":[],"chunks":[]}