Skip to main content
POST
Upload a file into Drive

Authorizations

Authorization
string
header
required

An API key from the web app (Settings → Developer), sent as Authorization: Bearer rvl_live_….

Body

application/json
name
string
required

File name with its extension, e.g. ligands.sdf.

Required string length: 1 - 255
sizeBytes
integer
required
Required range: x <= 1073741824
contentType
string
default:application/octet-stream
Maximum string length: 100
folderId
string

A folder id: dfld_… in your Drive, sdfld_… in a shared drive. Leave out for the root.

driveId
string

A shared drive (drive_…, from GET /v1/drive/shared-drives). Leave out for your own Drive. Not needed with an sdfld_… folder.

onConflict
enum<string>
default:rename

When a file of that name is already there: rename adds " (1)", " (2)"…; error answers 409.

Available options:
rename,
error

Response

OK

id
string
required

The file id (dfile_… or sdfile_…) it will have once completed.

name
string
required

The name it will have, after renaming on a clash.

status
string
required
Allowed value: "pending_upload"
upload
object
required

PUT the bytes to url with headers before expiresAt, then POST /v1/drive/files/{driveFileId}/complete.