Use this flow instead of POST /v1/documents/submit when:
  • Files exceed 50 MB
  • You need resumable uploads that survive network interruptions
  • You want to track per-file progress during upload

Step 1: Start a session

curl -X POST "https://partner-api.sannos.ai/v1/documents/upload/start" \
  -H "X-API-Key: $EVE_COMPANY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [{ "fileName": "large-report.pdf", "fileSize": 157286400 }],
    "complianceReviewId": "01REV..."
  }'
Response gives you sessionId and per-file fileId, chunkSizeBytes, totalChunks:
{
  "sessionId": "01SES...",
  "expiresAt": "2025-01-21T14:30:00Z",
  "files": [
    {
      "fileId": "01FIL...",
      "fileName": "large-report.pdf",
      "chunkSizeBytes": 5242880,
      "totalChunks": 30
    }
  ]
}

Step 2: Upload chunks

Send each chunk as raw binary. Chunks are zero-indexed — send them in order.
curl
# Upload chunk 0 (e.g. the first 5 MB slice, split locally beforehand)
curl -X PUT \
  "https://partner-api.sannos.ai/v1/documents/upload/$SESSION_ID/files/$FILE_ID/chunks/0" \
  -H "X-API-Key: $EVE_COMPANY_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @chunk-0.bin
Each response shows progress: { "receivedChunks": 1, "totalChunks": 30, "isComplete": false } The last chunk automatically commits the upload and triggers compliance processing:
{
  "receivedChunks": 30,
  "totalChunks": 30,
  "isComplete": true,
  "documentId": "01DOC...",
  "complianceReviewId": "01REV...",
  "status": "Pending"
}

Step 3: Poll for results (same as regular submit)

curl
curl "https://partner-api.sannos.ai/v1/documents/$DOCUMENT_ID/status" \
  -H "X-API-Key: $EVE_COMPANY_KEY"
curl "https://partner-api.sannos.ai/v1/documents/$DOCUMENT_ID/result" \
  -H "X-API-Key: $EVE_COMPANY_KEY"
Session expiry: Sessions expire after 24 hours. Expired sessions return 410 Gone on chunk upload.