Skip to main content
POST
Prepare a Google Drive session for host file transport

Authorizations

x-api-key
string
header
required

Organization API key passed as the x-api-key header. The raw key is the header value; do not prefix it with Bearer.

Body

application/json
name
string
required

File basename; no file bytes or local paths.

Required string length: 1 - 255
Pattern: ^[^\x00-\x1f\x7f]+$
size
integer
required

Exact file size in bytes, up to Google's 5 TiB limit.

Required range: 1 <= x <= 5497558138880
mimeType
string
default:application/octet-stream
Required string length: 1 - 255
Pattern: ^[A-Za-z0-9!#$&^_.+-]+\/[A-Za-z0-9!#$&^_.+-]+$
folderId
string
Required string length: 1 - 512
Pattern: ^[A-Za-z0-9_-]+$
connectionId
string
Pattern: ^(google-workspace|emc_[A-Za-z0-9]+)$

Response

Secret upload session for host transport.

ok
boolean
required
uploadUrl
string<uri>
required

Secret bearer upload-session URL. Never print, share, persist, or log it. Only upload the authorized file; no Google access token is needed.

method
string
required
Allowed value: "PUT"
size
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
chunkSize
number
required
instructions
string
required