Skip to main content
API/Reference/Authorize a file upload
POST/api/v1/files/upload

Authorize a file upload

Create a bounded upload workflow for a private source file.

Authentication

API key

Scopes

files:write

Contract

API v1

Request

curl -X POST 'https://api.maxscanner.app/api/v1/files/upload' \
  -H 'Authorization: Bearer $MAXSCANNER_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: unique-request-id' \
  -d '{ "filename": "scan.pdf", "contentType": "application/pdf", "sizeBytes": 1048576 }'

Request body

{ "filename": "scan.pdf", "contentType": "application/pdf", "sizeBytes": 1048576 }

Response

{ "uploadUrl": "…", "sourceKey": "…", "expiresAt": "…" }

Implementation notes

  • Upload URLs are short-lived.
  • Validate file size and type before processing.

Try this endpoint

Use the API Playground to authenticate and test safely before wiring the endpoint into your application.

Open Playground →