DokuBrain

Ingestion

Upload and ingest documents

Upload a document

Upload a document file for processing. The document will be automatically parsed, classified, and embedded.

POST
/ingestion

Authorization

AuthorizationRequiredBearer <token>

Use a JWT access token or API key. Include as: Authorization: Bearer <token>

In: header

Request Body

multipart/form-dataRequired
fileRequiredfile

Document file (PDF, DOCX, HTML, TXT, EML, images)

Format: "binary"
project_idstring

Assign to a project (optional)

auto_classifyboolean
Default: true
generate_embeddingsboolean
Default: true
extract_fieldsboolean
Default: true
prioritystring
Value in: "low" | "normal" | "high"
webhook_urlstring

URL to notify when processing completes

Format: "uri"
metadatastring

JSON string of custom metadata

curl -X POST "https://api.dokubrain.com/api/v1/ingestion" \
  -H "Authorization: Bearer <token>" \
  -F file="string" \
  -F project_id="string" \
  -F auto_classify="true" \
  -F generate_embeddings="true" \
  -F extract_fields="true" \
  -F priority="low" \
  -F webhook_url="http://example.com" \
  -F metadata="string"

Document accepted for processing

{
  "success": true,
  "data": {
    "id": "string",
    "filename": "string",
    "mimeType": "string",
    "size": 0,
    "status": "processing",
    "projectId": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}

Ingest documents via JSON (base64)

POST
/ingestion/json

Authorization

AuthorizationRequiredBearer <token>

Use a JWT access token or API key. Include as: Authorization: Bearer <token>

In: header

Request Body

application/jsonRequired
documentsRequiredarray<object>
project_idstring
prioritystring
Value in: "low" | "normal" | "high"
curl -X POST "https://api.dokubrain.com/api/v1/ingestion/json" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {
        "file_base64": "string",
        "filename": "string",
        "source_type": "string",
        "metadata": {}
      }
    ],
    "project_id": "string",
    "priority": "low"
  }'

Documents accepted

{
  "success": true,
  "data": {},
  "message": "string"
}

List ingestion jobs

GET
/ingestion/jobs

Authorization

AuthorizationRequiredBearer <token>

Use a JWT access token or API key. Include as: Authorization: Bearer <token>

In: header

Query Parameters

statusstring
project_idstring
limitinteger
Default: 20
offsetinteger
Default: 0
curl -X GET "https://api.dokubrain.com/api/v1/ingestion/jobs?status=%3Cstring%3E&project_id=%3Cstring%3E&limit=20&offset=0" \
  -H "Authorization: Bearer <token>"

Job list

{
  "success": true,
  "data": {},
  "message": "string"
}

Get ingestion job status

GET
/ingestion/jobs/{jobId}

Authorization

AuthorizationRequiredBearer <token>

Use a JWT access token or API key. Include as: Authorization: Bearer <token>

In: header

Path Parameters

jobIdRequiredstring
curl -X GET "https://api.dokubrain.com/api/v1/ingestion/jobs/<string>" \
  -H "Authorization: Bearer <token>"

Job details

{
  "success": true,
  "data": {},
  "message": "string"
}