Skip to main content
POST
/
v0
/
documents
/
upload-markdown-batch
Upload a batch of markdown documents
curl --request POST \
  --url https://api.avidoai.com/v0/documents/upload-markdown-batch \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-application-id: <api-key>' \
  --data '
{
  "importName": "Knowledge Base v2",
  "batchId": "456e7890-e89b-12d3-a456-426614174001",
  "batchIndex": 0,
  "totalBatches": 25,
  "totalFiles": 5000,
  "documents": [
    {
      "fileName": "getting-started/login.md",
      "title": "Inloggen Internet Bankieren - ABN AMRO",
      "content": "<string>",
      "language": "english",
      "tags": [
        "auth",
        "self-service"
      ],
      "metadata": {
        "url": "https://example.com/page",
        "sourceFileName": "login.md"
      }
    }
  ],
  "documentType": "KNOWLEDGE",
  "quickstartId": "456e7890-e89b-12d3-a456-426614174001",
  "topicId": "789e0123-e89b-12d3-a456-426614174002"
}
'
{
  "message": "Resource not found"
}

Documentation Index

Fetch the complete documentation index at: https://docs.avidoai.com/llms.txt

Use this file to discover all available pages before exploring further.

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"

Response

Batch uploaded and queued for processing successfully