Skip to main content

Upload Small Document To DataRoom

Objective

This operation is intended for uploading small-sized files (less than 500MB). For larger files, please refer to the multipart upload process.

Uploading a document to a specific DataRoom involves the following steps:

  1. Initiate the Upload: call the initiateDataRoomDocumentUpload mutation to begin the upload process. This sets up an upload session and returns:

    • An upload object
    • A pre-signed URL for uploading the file directly to storage
  2. Upload the File: make an HTTP PUT request to the provided pre-signed URL, including the file's data in the request body.

  3. Processing Phase: after the upload succeeds (HTTP 200 OK), the file enters a processing phase (e.g., virus scanning, indexing). The document becomes available in the dataRoom only after this phase completes successfully.

  4. Track Upload Status: to monitor the progress and final state of the upload, clients should poll the dataRoomDocumentUpload query. This query returns:

    • The current DocumentTransferStatus (e.g., PENDING, PROCESSING, COMPLETED, FAILED)
    • Associated timestamps
    • A reference to the resulting document (if available)
    • Polling should continue until the upload reaches one of the terminal states:
      • COMPLETED – The document is successfully processed and available in the DataRoom.
      • FAILED – The upload or processing encountered an error.

Initiate Small Document Upload

Initiates the single-part upload process for a document. This mutation sets up an upload session and returns an upload object, along with a pre-signed URL that can be used to upload the file directly to storage.

info

This operation require the DataRoom-scoped token.

mutation InitUpload {
initiateDataRoomDocumentUpload(
input: { dataRoomId: "RGF0YVJvb206NjczOTQ=", fileName: "filename.pdf" }
) {
uploadPresignedUrl
upload {
id
expiresAt
status
updatedAt
createdAt
}
}
}

Get Document Upload Status

Retrieves the status and details of a document upload request by its unique ID. This is used to track progress through the upload pipeline — from initiation to processing completion.

info

This operation require the DataRoom-scoped token.

query GetUploadStatus {
dataRoomDocumentUpload(
id: "RGF0YVJvb21Eb2N1bWVudFVwbG9hZDowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDA="
) {
id
status
updatedAt
expiresAt
createdAt
failureReason
}
}