DokuBrain

Templates

Extraction template management

List extraction templates

GET
/templates

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Query Parameters

pageinteger
limitinteger
categorystring
searchstring
curl -X GET "https://api.dokubrain.com/api/v1/templates?page=0&limit=0&category=%3Cstring%3E&search=%3Cstring%3E" \
  -H "Authorization: Bearer <token>"

Template list

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

Create an extraction template

POST
/templates

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Request Body

application/jsonRequired
nameRequiredstring
categoryRequiredstring
descriptionstring
visibilitystring
Value in: "private" | "organization" | "public"
capabilitiesobject
tagsarray<string>
curl -X POST "https://api.dokubrain.com/api/v1/templates" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "category": "string",
    "description": "string",
    "visibility": "private",
    "capabilities": {},
    "tags": [
      "string"
    ]
  }'

Template created

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

Get template details

GET
/templates/{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/templates/<string>" \
  -H "Authorization: Bearer <token>"

Template details

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

Delete a template

DELETE
/templates/{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/templates/<string>" \
  -H "Authorization: Bearer <token>"

Template deleted

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

Update a template

PUT
/templates/{id}

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Request Body

application/jsonOptional
namestring
descriptionstring
capabilitiesobject

Path Parameters

idRequiredstring
curl -X PUT "https://api.dokubrain.com/api/v1/templates/<string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "capabilities": {}
  }'

Template updated

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

Extract fields from a document using this template

POST
/templates/{id}/process

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Request Body

application/jsonRequired
document_idRequiredstring
optionsobject

Path Parameters

idRequiredstring
curl -X POST "https://api.dokubrain.com/api/v1/templates/<string>/process" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": "string",
    "options": {
      "force_reprocess": true,
      "include_confidence": true
    }
  }'

Extraction result

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