/api/uploadInitialize an upload — returns a presigned URL.
Request body
{
"filename": "msa-acme.pdf", // string, ≤ 255 chars
"mimeType": "application/pdf", // pdf | docx | doc | text/plain
"sizeBytes": 184320, // 64 ≤ N ≤ 26214400 (25 MB)
"sha256": "e3b0c44298fc1c149a…", // 64-char lowercase hex
"templateId": "vendor_msa" // optional — see Templates list
}Response — 200 OK
{
"documentId": "f9a3a4b6-…",
"uploadUrl": "https://…r2…?X-Amz-Signature=…",
"method": "PUT",
"headers": { "Content-Type": "application/pdf" },
"expiresAt": "2026-05-01T18:30:00Z"
}- PUT the file bytes directly to uploadUrl. The presign expires in 15 minutes.
- Document quota check happens here, not at /complete.