Skip to content

Upload Library Documents

POST
/library/documents/upload-batch

Upload SEVERAL files in one request.

PARTIAL SUCCESS IS THE NORMAL OUTCOME. Each file is processed on its own session, so one rejected file does not roll the others back and the status stays 201. Read the per-file result in the body, not the HTTP status.

Named upload-batch rather than the app’s upload-multi: the same operation, spelled the way the rest of this contract spells a bulk verb.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

object
account_id
Any of:
string
campaign_id
Any of:
string
context_type
string
default: global
Allowed values: global campaign account
files
required

The files. Each is subject to the same rules.

Array<string>
folder_path
required

Where they all land. One folder for the batch.

string

Responses

201

Successful Response

object
data
required

An open envelope for a LIST result, so a bare list keeps its shape.

items is always present and always the list, whichever key the app used for it - so a caller can page one way rather than learning six key names.

object
items
Array
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