sandboxes

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

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v2/sandboxes/sessions/{sessionId}/fs/write
  • Auth: HTTP bearer

Path parameters

sessionIdstring required

The unique identifier of the session to write files to.

Example:sbx_abc123

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-cwdstring

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

Response

The files were successfully written to the session.

object required

Changes