Skip to main content
POST
Upload a batch of markdown documents

Authorizations

x-api-key
string
header
required

Your unique Avido API key

x-application-id
string
header
required

Your unique Avido Application ID

Body

application/json

Request for uploading a batch of pre-parsed markdown documents.

importName
string
required

User-provided name for this import.

Required string length: 1 - 256
Example:

"Knowledge Base v2"

batchId
string<uuid>
required

Client-generated ID grouping batches from one folder upload.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"456e7890-e89b-12d3-a456-426614174001"

batchIndex
integer
required

Zero-based index of this batch within the upload.

Required range: 0 <= x <= 9007199254740991
Example:

0

totalBatches
integer
required

Total number of batches in this upload.

Required range: 1 <= x <= 9007199254740991
Example:

25

totalFiles
integer
required

Total number of files across all batches.

Required range: 1 <= x <= 10000
Example:

5000

documents
MarkdownDocumentItem · object[]
required

Array of pre-parsed markdown documents.

Required array length: 1 - 200 elements
documentType
enum<string>
default:KNOWLEDGE

Type of the documents being uploaded. Defaults to KNOWLEDGE.

Available options:
KNOWLEDGE,
POLICY
Example:

"KNOWLEDGE"

quickstartId
string<uuid>

ID of the quickstart this upload belongs to.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"456e7890-e89b-12d3-a456-426614174001"

topicId
string<uuid>

ID of the topic to associate uploaded documents with.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"789e0123-e89b-12d3-a456-426614174002"

metadata
object

Optional extra metadata persisted onto the FileProcessing row and forwarded to the processor. Used to flag uploads that should hand off to the KB-review classification orchestrator ({ step: "KNOWLEDGE_BASE_REVIEW" }).

Example:

Response

Batch uploaded and queued for processing successfully