Skip to main content
Creates a chunked upload session. The response contains an upload_id and one pre-signed PUT URL per chunk. You then upload each chunk directly to its URL, save the returned ETag, and finally call Create Item with item_type: "file" and from: { upload_id, part_etags } to materialize the file in the Library.
This endpoint only reserves storage and returns URLs — it does not move any bytes. The file is not visible in the Library until Create Item succeeds.
Permission required: drive:item_add · serviceWorkflow note: This is step 1 of the Library upload flow. Step 2 is Create Item (same permission). To then attach the file to a project, call Import Documents, which additionally requires project:doc_add.

Request Body

integer
required
Total file size in bytes. Minimum 1. The server uses this to decide the chunk layout — number of parts and each part’s byte range.

Response

object

Uploading chunks

After this call returns, PUT each chunk to its upload_url. The response to every PUT contains an ETag header — you must collect all of them, in order, to complete the upload.
Do not send an Authorization header when PUTing to upload_url — the URL is already pre-signed. Sending bearer auth may cause the PUT to be rejected by the storage backend.
Pre-signed URLs expire. Finish uploading all chunks and call Create Item promptly after creating the upload session. If URLs expire before you finalize, simply create a new upload session and restart.

Next Step

Create Item

Finalize the upload by creating a file item that references this upload’s upload_id and the collected part_etags.