file.upload
Creates a file record and returns a presigned upload URL. Upload the file content to the returned upload_url via PUT before it expires. Use file.detail to check upload status or download the file. Then use the file.id as file_id in task.create or task.sendMessage message content. See Limits.
Limits
QuotaExceededError.
Files attached inline in a task message instead of through file.upload have a lower cap: file_url and decoded file_data are limited to 20 MB each. Upload larger files first and pass the returned file.id as file_id.Headers
API key for direct authentication. Provide either this or Authorization, not both. See Authentication.
Body
Name of the file to upload, including extension (e.g., "report.pdf", "data.csv"). The extension helps determine the file type.
Response
File record created successfully.
Whether the request was successful.
true
Unique identifier for this API request.
The created file record. Status will be pending until the upload completes.
Presigned S3 URL for uploading the file content. Send a PUT request with the file bytes as the body. Expires in 3 minutes.
Unix timestamp in seconds when upload_url expires, encoded as a decimal string. Complete the upload before this time.
^[0-9]+$"1893456180"