Knowledge Base

Upload multiple documents

Upload up to 100 documents to a knowledge base in a single request. Each document is processed independently — the response includes per-item results so you can identify which succeeded and which failed.

Each item supports the same fields as the single-upload endpoint, including the optional sourceUrl field on text uploads.

post/knowledge-bases/{id}/documents/batch

Request

  • Base URL
    https://api.markcopy.ai/api/v1
  • Auth
    API key in header X-API-Key

Path parameters

idstring required
Example:kb_a8f3x9k2m4pQ

The external ID of the knowledge base (prefixed with kb_).

Request body

Response

Batch processed. Each item has its own success or error status.

Example response

{
  "results": [
    {
      "document": {
        "id": "doc_b7n4p1q8r3wX",
        "jobId": "job_a8f3x9k2m4pQ",
        "name": "Q4 2025 Report",
        "tags": [
          "reports",
          "quarterly"
        ],
        "sourceUrl": "https://wiki.internal/page-1",
        "mimeType": "text/markdown"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.