Skip to main content
Imports files from the user’s Library into a project. Each imported file becomes a project document and is queued for processing immediately. The operation is batch and supports partial success — the response tells you how many imports succeeded and how many failed. You can pass either file or directory IDs in drive_item_ids. Directories are recursively flattened to every descendant file before import, so importing a folder effectively imports its whole subtree in one call. Unsupported item types inside a directory are silently skipped. For convenience, drive_item_ids also accepts two aliases:
  • MY_SPACE — import every file under the user’s workspace root in one call.
  • ROOT — import every file the user has access to across the whole Library.
To add a file that is not yet in the Library, upload it first using the Library upload flow.
Permissions required (all of):Workflow note: The two permissions above are checked together when this endpoint is called — drive:item_read is needed because the server resolves and reads each referenced drive item. If you’re uploading a new file end-to-end first, the Library upload calls (Create Upload and Create Item) additionally require drive:item_add.

Path Parameters

string
required
Project ID.

Request Body

array
required
Library item IDs to import. Accepts file and directory IDs in any combination — directories are recursively flattened to all descendant files, and unsupported item types are silently skipped. The aliases MY_SPACE (your workspace root) and ROOT (the whole Library) are also accepted.

Response

object
After import, documents start out with status pending and transition through runningokay (or error). Poll List Documents or Get Document to observe progress.

Typical Flow

1

Put the file in the Library

Either upload it via the chunked upload flow, or locate an existing file with List Items.
2

Call Add Documents

Pass one or more item_ids inside drive_item_ids. You can mix files and directories — passing a directory imports every descendant file in one call. Batch in a single request when you can; it is faster than looping.
3

Track processing status

Poll List Documents until the new documents reach okay.