DokuBrain

Documents

Document management, extraction, and summarization

List documents

GET
/documents

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Query Parameters

project_idstring
statusstring
Value in: "processing" | "completed" | "failed"
classificationstring
searchstring
sortstring
Default: "createdAt"
orderstring
Default: "desc"Value in: "asc" | "desc"
pageinteger
Default: 1
limitinteger
Default: 20
curl -X GET "https://api.dokubrain.com/api/v1/documents?project_id=%3Cstring%3E&status=processing&classification=%3Cstring%3E&search=%3Cstring%3E&sort=createdAt&order=asc&page=1&limit=20" \
  -H "Authorization: Bearer <token>"

Document list

{
  "success": true,
  "data": [
    {
      "id": "string",
      "filename": "string",
      "mimeType": "string",
      "size": 0,
      "status": "processing",
      "classification": {
        "type": "string",
        "confidence": 0
      },
      "pageCount": 0,
      "wordCount": 0,
      "projectId": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "processedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "total": 0,
    "page": 0,
    "limit": 0,
    "hasMore": true
  }
}

Get document details

GET
/documents/{id}

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Path Parameters

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

Document details

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

Delete a document

Permanently deletes the document, extracted data, and vector embeddings.

DELETE
/documents/{id}

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Path Parameters

idRequiredstring
curl -X DELETE "https://api.dokubrain.com/api/v1/documents/<string>" \
  -H "Authorization: Bearer <token>"

Document deleted

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

Update document metadata

PUT
/documents/{id}

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Request Body

application/jsonOptional
filenamestring
project_idstring
classificationstring
metadataobject

Path Parameters

idRequiredstring
curl -X PUT "https://api.dokubrain.com/api/v1/documents/<string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "string",
    "project_id": "string",
    "classification": "string",
    "metadata": {}
  }'

Document updated

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

Download original document file

GET
/documents/{id}/download

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.dokubrain.com/api/v1/documents/<string>/download" \
  -H "Authorization: Bearer <token>"

File stream

"string"

Get extracted fields for a document

GET
/documents/{id}/extracted-fields

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.dokubrain.com/api/v1/documents/<string>/extracted-fields" \
  -H "Authorization: Bearer <token>"

Extracted fields

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

Translate a document

POST
/documents/{id}/translate

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Request Body

application/jsonRequired
target_languageRequiredstring

ISO 639-1 language code (e.g., 'es', 'fr', 'de')

source_languagestring

Path Parameters

idRequiredstring
curl -X POST "https://api.dokubrain.com/api/v1/documents/<string>/translate" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "target_language": "string",
    "source_language": "string"
  }'

Translation result

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

Get AI-generated insights for a document

GET
/documents/{id}/insights

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.dokubrain.com/api/v1/documents/<string>/insights" \
  -H "Authorization: Bearer <token>"

Document insights

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