Skip to main content
PUT
Write a file

Authorizations

Authorization
string
header
required

A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

Path Parameters

id
string
required

Stable public computer identifier.

Minimum string length: 1
Example:

"cmp_123"

Query Parameters

path
string
required

Path inside the computer. A relative path is relative to /home/runtime, or to /home/runtime/app on a published site without a Linux computer.

Minimum string length: 1
Example:

"/home/runtime/app.txt"

mode
string

Optional Unix permission mode in octal.

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

"0644"

Body

application/octet-stream

The body is of type file.

Response

The path and byte count written.

path
string
required
size
integer
required
Required range: x >= 0