Skip to main content
POST
/
upload
/
init
Start an upload session
curl --request POST \
  --url https://api.indoralabs.com/upload/init \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "filename": "report.pdf",
  "contentType": "application/pdf",
  "sizeBytes": 1048576
}
'
{
  "mode": "multipart",
  "uploadId": "upl_123",
  "key": "tenant/abc/file/xyz",
  "uploadIdS3": "AbCdeFG..."
}

Authorizations

x-api-key
string
header
required

Body

application/json
filename
string
required

Client-provided file name (used for display only).

contentType
string
required

MIME type of the file (e.g., application/pdf).

sizeBytes
integer
required

Total file size in bytes.

Response

Upload session info

mode
enum<string>

Upload mode chosen by server based on size.

Available options:
single,
multipart
uploadId
string

Server-side upload session id.

key
string

S3 object key to use for subsequent requests.

putUrl
string

Pre-signed URL for single part upload (present when mode=single).

uploadIdS3
string

S3 UploadId for multipart uploads.