Promote a container file into workspace documents
Copies a file from the container’s sandbox prefix into the workspace’s durable document storage, so it outlives the container. Returns the new document in the Files API shape, with a durable file id in the documents namespace. The copy counts against the workspace’s storage quota exactly like an upload.
Authorizations
API key as bearer token in Authorization header
Path Parameters
The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own -r<nonce>-suffixed id. A session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id that was sent.
"sess_abc123"
Container file id (cfile_ + base64url of the file path).
"cfile_b3V0L3JlcG9ydC5jc3Y"
Response
The promoted file, as a workspace document.
- Option 1
- Option 2
- Option 3
A stored file. The shape is negotiated per request — see the endpoint description.