Skip to main content
POST
/
uploads
Initiate a resumable upload
curl --request POST \
  --url https://app.strandai.com/api/v1/uploads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "fileSize": 123,
  "contentType": "<string>",
  "contentSha256": "<string>"
}
'
{
  "uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "gcsPath": "<string>",
  "uploadUrl": "<string>",
  "existing": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
filename
string
required
fileSize
integer
required
contentType
string
required
contentSha256
string

Optional client-computed sha256 of the file bytes (64 lowercase hex chars). When supplied, the platform checks for an existing non-archived sample in the same org with the same hash; on a hit the response carries existing: true and the existing uploadId instead of minting a new signed URL.

Pattern: ^[0-9a-f]{64}$

Response

Resumable upload URL

uploadId
string<uuid>
required
gcsPath
string
required
uploadUrl
string

Resumable upload URL — PUT slide bytes here. Omitted when existing: true.

existing
boolean

True when contentSha256 matched an existing non-archived sample in the same org. In that case uploadUrl is omitted and the byte upload should be skipped.