Learn how to securely upload documents using the SignumFlow API with presigned URLs.
The upload process consists of three steps:
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
}'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)
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"
}]
}'