Skip to content

Get Library Tree

GET
/library/tree

Folders and their documents, nested - the whole library in one call.

The read to build a file browser from. /library/folders and /library/documents are the flat halves of the same data.

Authorizations

Parameters

Query Parameters

context_type

Whose library to read. campaign and account additionally need the matching id below; without it the app reads the GLOBAL library, which is a different set of documents rather than an error.

string
default: global
Allowed values: global campaign account

Whose library to read. campaign and account additionally need the matching id below; without it the app reads the GLOBAL library, which is a different set of documents rather than an error.

campaign_id
Any of:
string

Campaign id. Only read when context_type is campaign.

account_id
Any of:
string

Account id. Only read when context_type is account.

Header Parameters

X-Target-Org-Id
Any of:
string

Responses

200

Successful Response

object
data
required

An open envelope for one document, folder or questionnaire.

Open on purpose: a Library document carries extraction metadata, a questionnaire carries per-provider processing detail, and a generated deal document carries structured_data and highlights whose shape is the generator’s rather than this contract’s. Pinning those would silently drop whatever the app learned to return that this file had not caught up on.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string