Reserve a file upload
Reserves quota for a new file and returns a content-PUT URL plus the reservation TTL. Validates the MIME, size, and (for per-task uploads) the run/task field constraints before reserving. The body carries filename, mimeType, sizeBytes, and optional tags, folderId, runId, taskId, fieldKey.
Authentication
AuthorizationBearer
WorkOS session JWT or an organization API key, sent as Authorization: Bearer <token>.
Path parameters
projectId
Request
This endpoint expects an object.
filename
The original file name.
mimeType
The file's MIME type.
sizeBytes
The exact byte size of the upload.
folderId
Target folder id (null/absent = the Inbox).
runId
For a run-level or per-task upload, the run id.
taskId
For a per-task upload, the task id.
fieldKey
For a per-task upload, the file-upload field key.
Response
The reservation with a content-PUT URL.
fileId
uploadUrl
expiresIn
confirmBy
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
413
Content Too Large Error
415
Unsupported Media Type Error
500
Internal Server Error