Skip to main content
PUT
Write a file

Authorizations

Authorization
string
header
required

An API key that starts with vms_. Make one in Settings > API keys.

Path Parameters

id
string
required
Example:

"sbx_06d8k3m7q2v9x4b1n5c0e8f2ja"

Query Parameters

path
string
required

The absolute path in the sandbox.

Required string length: 1 - 4096
Pattern: ^\/
Example:

"/home/user/app/index.ts"

mode
string

The octal mode of the file, such as 0755. A new file gets 0644 by default, and a replaced file keeps its mode.

Pattern: ^0[0-7]{3,4}$

Body

application/octet-stream

The body is of type file.

Response

The file.

sandboxId
string
required
path
string
required
Required string length: 1 - 4096
Pattern: ^\/
bytes
integer
required
Required range: 0 <= x <= 9007199254740991
mode
string
required

An octal mode, such as 0644.

Pattern: ^0[0-7]{3,4}$
modifiedAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$