Upload a file
Stores a file the organization can attach to any number of sessions. Attaching one mounts it read-only into the session’s sandbox under its files directory, and the agent knows where to find it. Send the bytes as the file part of a multipart/form-data body; the part’s filename and Content-Type become the file’s name and media type. The file part may contain at most 30 MiB, and the complete multipart request may use at most 128 KiB more for framing and form fields. Larger files are not supported by this Platform V1 operation. The bytes are served back through GET /managed-agents/v1/files//content to the same organization. A request over the transport limit answers 413 with code payload_too_large. An upload that would carry the organization’s live files past its storage quota answers 413 with code file_quota_exceeded and reports the quota, bytes in use, and incoming size in details.
Authorizations
Headers
Body
Multipart body for uploading a file. Send the bytes as the file part; the part's filename and Content-Type become the file's name and media type. The v2-only expiresInSeconds part is rejected; use expires_in_seconds on this route.
How long the file stays attachable and its content served, from 3600 (an hour) to 7776000 (ninety days); its metadata stays readable, with expires_at in the past, for a grace after that. Omit for a file that does not expire. Set once: a file's expiry cannot be changed.
-9007199254740991 <= x <= 9007199254740991Response
A file object: bytes uploaded once and attachable to any number of sessions as a resource, or bytes a session produced. Attaching a file mounts it read-only into the session's sandbox at a path the session is told about.
A file object: bytes uploaded once and attachable to any number of sessions as a resource, or bytes a session produced. Attaching a file mounts it read-only into the session's sandbox at a path the session is told about.
The upload's declared Content-Type. When the part declared none, or declared application/octet-stream, the type is detected from the filename's extension, through a fixed table rather than the host's, and then from the bytes, falling back to application/octet-stream when neither says anything. Informational: the platform does not transcode or validate against it.