Diska
Knowledge

Create a knowledge base

Creates an empty knowledge base.
POST https://api.diska.ai/v1/knowledge-bases

Scope: knowledge:write

Add documents with the three endpoints that follow and assign the base to an agent in the backoffice.

Request body

application/json

FieldTypeRequiredDescription
namestringYesBase name. Up to 200 characters.
instructionstringYesWhen and how the agent should use this base. Up to 4000 characters.
descriptionstring | nullNoDescription. Up to 2000 characters.
{
  "name": "Produtos e preços",
  "instruction": "Use esta base para responder a perguntas sobre produtos, preços e horários.",
  "description": "Tabela de preços e horários de 2026."
}

Examples

curl -X POST "https://api.diska.ai/v1/knowledge-bases" \
  -H "Authorization: Bearer $DISKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Produtos e preços","instruction":"Use esta base para responder a perguntas sobre produtos, preços e horários.","description":"Tabela de preços e horários de 2026."}'

Try it

Send the request from this page, with your key. The key stays on this page: it is not stored and is only sent to api.diska.ai. Use a test key with the fewest scopes you need.

POSThttps://api.diska.ai/v1/knowledge-bases
Starts with dsk_. It stays in this browser tab only.
Enter an API key (dsk_…).

Response 201

FieldTypeDescription
idstringID.
organization_idstringOrganization it belongs to.
namestringBase name.
instructionstringWhen and how the agent should use this base.
descriptionstring | nullDescription, or null.
document_countintegerNumber of documents. Default: 0.
assigned_agent_countintegerAgents that use this base. Default: 0.
created_atstring | nullCreation date (ISO 8601).
updated_atstring | nullLast change date (ISO 8601).
{
  "id": "b2e4c6d8-1a3f-4e5b-9c7d-0f2a4b6c8e10",
  "organization_id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
  "name": "Produtos e preços",
  "instruction": "Use esta base para responder a perguntas sobre produtos, preços e horários.",
  "description": "Tabela de preços e horários de 2026.",
  "document_count": 3,
  "assigned_agent_count": 1,
  "created_at": "2026-10-25T18:40:00Z",
  "updated_at": "2026-10-25T18:40:00Z"
}

Errors

This endpoint has no errors of its own.

Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

Copyright © 2026