Skip to main content

Endpoint

POST /v1/sandboxes/{id}/files

Parameters

ParameterTypeRequiredDescription
idstringYesSandbox ID returned from create.

Request

Multipart form upload. One file per request.

Response

{
  "filename": "main.py"
}

Example

curl -X POST http://localhost:8000/v1/sandboxes/sb_abc123/files \
  -F "file=@main.py"
Upload only when files change. The workspace persists between runs — there is no need to re-upload unchanged files.