Upload File
Start a file upload.
Reserves a file record for the given filename, content_type, and
size_bytes, and returns a short-lived signed upload_url the client uses
to PUT the file content directly. Call the complete-upload endpoint with
the returned file_id once the bytes have been uploaded.
uploadUrl, then call POST /v1/files/upload/{file_id}/complete. The completed file is returned as MIMEData and can be passed directly to extractions, workflows, and other operations.
Use the uploaded file in later requests
For large documents, prefer an object-storage URL first. Retab fetches the file server-side, avoiding inline/base64 request bodies that can trigger413 Request Entity Too Large. Use a time-limited signed URL when the object is private.
Supported remote URL hosts include Azure Blob Storage (*.blob.core.windows.net), Google Cloud Storage (storage.googleapis.com), Amazon S3 (amazonaws.com), and Cloudflare R2 (*.r2.cloudflarestorage.com and *.r2.dev). Custom domains are not fetched by default; contact support if you need one allowlisted.
If you do not have an object-storage URL available, upload the file to Retab first. The SDK returns a durable MIMEData reference. You can pass that object directly, or pass its Retab storage URL.
https://storage.retab.com/file_... URLs are opaque Retab references, not public download links. Retab resolves them against the authenticated caller’s organization before processing.Authorizations
Body
Body to start a file upload: the filename, expected size_bytes, and optional content type and checksum.
Response
Successful Response
Instructions for uploading file content to a reserved file record.
Returned when starting a file upload. Carries the new file_id, a
short-lived signed upload_url with the HTTP method and headers to use,
a durable reference to the file, and the URL's expires_at time.
Underlying file ID
Short-lived signed upload URL
Durable Retab MIMEData reference
Upload URL expiration
HTTP method for upload
Headers required by the signed upload URL