Upload file
Upload a file to a workspace and push it to running computers.
destPath switches the endpoint to a second mode. That mode drops the file into one exact folder on one computer and records nothing. The two modes return different bodies. See Folder-targeted upload.
Request
Send amultipart/form-data request.
filename. The copy in object storage is keyed under a sanitised form of it.desktop_id of null. Association does not change where the file is pushed. Every running computer in the workspace receives it either way. Required when destPath is set./root/Documents or, on Windows, C:\Users\Public. The literal value desktop means the desktop folder of the computer’s user, which the computer resolves itself. When set, the file is placed at <destPath>/<file name> on the computer named by desktopId, and nothing else happens: no file record is written, no other computer receives it, and the response body is different. On Linux, a folder that does not exist is created. When omitted, the file is stored in the workspace and pushed to running computers.Response
WithoutdestPath, the whole stored row is returned under file.
id to the download and delete endpoints.workspace_id, under the workspace’s older name. Read workspace_id in new code.desktopId you supplied, or null."102400". The value is a 64-bit integer, so it is serialized as a string.application/octet-stream when the client sent none.upload for this endpoint.Example
Response
How the file reaches a computer
/root/Desktop on Linux) of every computer that is running at the time of upload. Computers that are stopped, or created afterwards, do not receive it. Upload again to reach them. The push is best-effort and runs in the background without being awaited, so it does not affect the status you get back.Folder-targeted upload
SettingdestPath places the file at one exact path on one computer. The response is a different shape and no file record is created. The file does not appear in the list endpoint, and it cannot be downloaded or deleted through this API.
true when the file was placed on the computer.destPath with surrounding whitespace trimmed, or the desktop when you sent desktop. The file name is not appended.Errors
Every error carries anerror message. The scope-mismatch 403 adds code, key_workspace_id, and target_workspace_id.
Authorizations
API key authentication. Get your key at orgo.ai/workspaces
Body
File to upload (max 10MB)
Workspace ID. Required; omitting it is a 400.
Computer to associate the file with. Omitted, the file belongs to the workspace and is synced to every running computer in it. Required when you send destPath.
Folder on the computer to place the file in. Sending it changes what the endpoint does: no file record is written, nothing is synced, and the bytes are pulled straight into that folder on the computer named by desktopId. It must be an absolute path, starting with / or with a drive letter such as C:\ or C:/ (for example C:\Users\Public on Windows), or the literal desktop, which places the file in the desktop folder of the computer's user. Anything else returns 400. Omitted, the file is stored against the workspace and synced to its running computers.
"/root/Desktop"
Response
File uploaded. destPath requests answer with the placement result instead of a file record.
- Option 1
- Option 2
The stored file record: every column of the row, plus workspace_id.