Skip to main content

Overview

Documents are uploaded via short-lived presigned URLs, then registered with the API as case documents. This guide walks through each step.

The 3-Step Upload Flow

Step 1: Request Presigned Upload URL

Request a temporary upload URL from the Enterprise API v2:
Request Body: Response:
The presigned URL expires after 15 minutes. Complete Step 2 before expiration or request a new URL.

Step 2: Upload the File

Upload your file using the presigned URL:
Important Notes:
  • Use PUT method (not POST)
  • Set Content-Type header matching the file type from Step 1
  • Send raw binary file data (not multipart/form-data)
  • Upload must complete within 15 minutes

Step 3: Create Document Record

After a successful upload, create the document record:
Request Body: Response:
The upload_id expires after 1 hour. Complete Step 3 within this window or the upload will be discarded.

Complete Example

Python

Node.js

Batch Upload

For uploading multiple files:

File Constraints

Error Handling

Common Errors

Upload URL Expired

Solution: Request a new presigned URL (Step 1).

Upload ID Not Found

Causes:
  • Upload ID expired (>1 hour old)
  • File was never uploaded to S3 (Step 2 failed)
  • Upload ID already used
Solution: Start over from Step 1.

File Not Uploaded

Cause: Step 2 (S3 upload) failed or was not completed. Solution: Retry Step 2 with the same upload URL (if not expired).

Best Practices

1. Check File Size Before Upload

2. Handle Timeouts

3. Verify Upload Success

4. Use Virtual Paths for Organization

Organize documents by provider or document type:

5. Clean Up on Failure

Security Considerations

  1. Never expose upload URLs - They grant write access for the file you signed
  2. Don’t reuse upload IDs - Each upload requires a fresh upload_id
  3. Validate file types - Ensure uploaded files match the file_type you signed for

Next Steps