← Back to Home

Upload Document

Learn how to securely upload documents using the SignumFlow API with presigned URLs.

Overview

The upload process consists of three steps:

  1. Get Presigned URL: Request a secure upload URL from SignumFlow API
  2. Upload to S3: Upload your file directly to S3 using the presigned URL
  3. Confirm Upload: Notify SignumFlow that the upload is complete

Step 1: Get Presigned Upload URL

Request a presigned URL from the SignumFlow API. This URL allows you to upload directly to S3 securely.

# Get presigned upload URL
curl -X POST "https://api.signumflow.com/api/v1/upload/" \
  -H "Authorization: sf_test_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "contract.pdf",
    "content_type": "application/pdf",
    "file_size": 2048576
  }'

Step 2: Upload File to S3

Use the presigned URL from Step 1 to upload your file directly to S3. This is a PUT request with your file as the body.

# Upload file to S3 (use upload_url from previous step)
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary @contract.pdf

# Expected: 200 OK (empty response body)

Step 3: Confirm Upload

After successfully uploading to S3, confirm the upload with SignumFlow.

# Confirm upload completion
curl -X POST "https://api.signumflow.com/api/v1/upload/confirm" \
  -H "Authorization: sf_test_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "5faedd1f-cee2-4fdb-85ce-566e9e417204",
    "completed_files": [{
      "key": "tenants/.../contract.pdf",
      "file_name": "contract.pdf"
    }]
  }'

Next Steps

→ Create a Workflow→ View Full API Reference→ Complete Quick Start Guide