Dynamiq
Knowledge Bases

Upload documents (knowledge base hostname)

Uploads one or more files for ingestion, served on the knowledge base's own hostname (returned in the hostname field of the knowledge base resource) and authenticated with an access key. Optional metadata is passed in the metadata form field as either a single JSON object (applied to every file) or a JSON array with one entry per file (its length must match the number of files). To replace existing items in place, pass their item IDs in the ids form field (JSON array, same length and order as files). The maximum request size is 128 MiB. Items are processed asynchronously; poll the items endpoints for status.

POST
/v1/upload

Authorization

accessKey
AuthorizationBearer <token>

Organization or project Access Key created in the Dynamiq console. Valid only on synapse-served hosts: deployed app hostnames, knowledge base hostnames, the AI Gateway (router.*), and the traces collector (collector.*). Prefix dynamiq_acc_. NOT accepted by the management API (api.*). Send as Authorization: Bearer <access-key>.

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/upload" \  -F files="[    \"string\"  ]"
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "status": "pending",
      "uploaded_at": "2019-08-24T14:15:22Z",
      "metadata": {}
    }
  ]
}
{
  "error": {
    "code": "bad_request",
    "message": "Bad Request",
    "details": {
      "input": "cannot be blank"
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Unauthorized"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not Found"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}