multipart/form-data with two fields: the destination path and the file content. For files larger than a few megabytes, use the streaming variant to avoid buffering the entire payload in memory.
Endpoint
Authentication
Your team’s API key. Pass the full
wrn_... key value.Path parameters
The ID of the capsule to write the file into. The capsule must be in the
running state.Request body
Content-Type:multipart/form-data
Absolute destination path inside the capsule filesystem, e.g.
"/app/main.py". The parent directory must already exist.The file content to upload.
Example request
Response
Returns204 No Content on success. No body is returned.
Streaming upload
For large files, use the streaming endpoint instead. It streams the payload directly to the capsule without buffering it in memory on the server:multipart/form-data with path and file fields. The response is also 204 No Content on success.
Python SDK
Error responses
| Status | Meaning |
|---|---|
409 Conflict | The capsule is not in the running state. Resume or start the capsule first. |
413 Content Too Large | The file exceeds the maximum allowed size. Use the streaming endpoint for large files. |