v14

latestOpenAPI 3.0.32026-08-04377889.4 MB
sandboxes

Write files

Uploads and extracts files to a session's filesystem. Files must be uploaded as a gzipped tarball (.tar.gz) with the Content-Type header set to application/gzip. The tarball contents are extracted to the session's working directory, or to a custom directory specified via the x-cwd header.

post/v2/sandboxes/sessions/{sessionId}/fs/write

Path parameters

sessionIdstring required

The unique identifier of the session to write files to.

Example:sbx_abc123

The unique identifier of the session to write files to.

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Headers

'x-Cwd'string

The target directory where the tarball contents will be extracted. If not specified, files are extracted to the sandbox home directory.

Example:/home/vercel-sandbox

The target directory where the tarball contents will be extracted. If not specified, files are extracted to the sandbox home directory.

Response

The files were successfully written to the session.

object required