Upload New File Version
Starts a resumable TUS upload of a new version of an existing uploaded File. Finish it with complete_file_upload. The File keeps serving its current version until the new one passes malware scanning; then the File, and every Room that has it, shows the new version, and each Room's activity says who uploaded it. Requires edit access to the File and its current revision. One new version uploads at a time.
Signed-in user's Supabase access token. Workspace-scoped operations also require SMB-Workspace-Id.
In: header
Path Parameters
Stable File ID.
^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$Header Parameters
Workspace where this operation runs. Required for user tokens and Workspace API keys.
uuid8 <= length <= 200Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/files/string/versions" \ -H "SMB-Workspace-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Idempotency-Key: stringst" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 1, "content_type": "application/pdf", "size_bytes": 1 }'{ "file": { "file_id": "string", "business_id": "string", "name": "string", "description": "string", "classification": "financial", "tags": [ "string" ], "origin": "upload", "lifecycle": "active", "current_version": { "file_version_id": "string", "version_number": 1, "content_type": "string", "size_bytes": 1, "sha256": "string", "processing_status": "pending_upload", "processing_error": "string", "summary": "string", "created_at": "2019-08-24T14:15:22Z", "ready_at": "2019-08-24T14:15:22Z" }, "revision": 1, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z", "access_level": "view" }, "upload": { "upload_id": "string", "protocol": "tus", "url": "http://example.com", "headers": { "x-signature": "string", "upload-metadata": "string" }, "expires_at": "2019-08-24T14:15:22Z", "max_size_bytes": 104857600 }, "new_version": { "file_version_id": "string", "version_number": 1, "content_type": "string", "size_bytes": 1, "sha256": "string", "processing_status": "pending_upload", "processing_error": "string", "summary": "string", "created_at": "2019-08-24T14:15:22Z", "ready_at": "2019-08-24T14:15:22Z" }, "action_receipt": { "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7", "command_id": "7d510d78-7444-4252-aeac-9e473949661e", "operation": "string", "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9" }, "idempotent_replay": true, "request_id": "string"}