Developer platform · v2

API reference

View as MarkdownAll docs

Knowledge bases

24 operations · all resources

What this covers#

Documents your agents answer from. A base holds markdown or plain-text documents, read in the background; an agent links up to 3 bases with knowledge_base_ids. Small knowledge sits whole in the agent's prompt and larger knowledge is searched during the call, by keyword and, optionally, by meaning on your own Google or OpenAI account. Dvaarik charges nothing for it.

Every example below runs as written once these are exported:

bash
export DVAARIK_API_KEY="dvk_..."        # project API key, server side only
export DVAARIK_TOKEN="<account access token>"   # console session, from POST /console/auth/login
export BASE_ID="<uuid>"
export DOCUMENT_ID="<uuid>"
export PROJECT_ID="<uuid>"

A <value> inside a JSON body is a value you supply. Responses are JSON; every error body is { "detail": … }. Each schema is expanded once per page, where it first appears.

Machine door errors#

Raised by the project-key dependency before any handler on this page runs.

StatusCause
401Missing API key or Invalid API key — the X-Api-Key header is absent, unknown, or revoked.
403API key is not scoped to a project, Project unavailable, or API key is missing the required scope '<scope>'.
429The project's api_rpm ceiling was exceeded. Honour Retry-After; X-RateLimit-* headers are on every response.

Scopes used on this page: voice:read, voice:write. Mint a key with only these.

Account door errors#

StatusCause
401No account session was presented, or it is invalid or expired. Refresh once, then re-authenticate.
403The account is suspended or its email is not verified.

Operations — project API key#

Call these from your own server with a project key. Never from a browser or a mobile bundle.

GET /v2/knowledge-bases#

List the project's knowledge bases with their documents, ready documents, characters and search.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:read
OperationlistKnowledgeBases
Success200 KnowledgeBasePage

KnowledgeBasePage#

FieldTypeRequiredNotes
dataKnowledgeBaseInfo[]yes

KnowledgeBaseInfo#

FieldTypeRequiredNotes
created_atdate-timeyes
descriptionstring or nullyes
document_countintegeryes
embedding_account_iduuid or nullyes
iduuidyes
namestringyes
ready_charsintegernodefault 0
ready_countintegeryes
revisionintegeryes
search"hybrid" or "keyword"yes
total_charsintegeryes
updated_atdate-timeyes

Unprocessable#

A 422 from a route that also refuses with a sentence: FastAPI's list of field errors when the body or query does not parse, or one sentence when it parsed and was refused.

FieldTypeRequiredNotes
detailstring or ValidationErrorItem[]yesA sentence for the developer, or the list of fields that failed validation.
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/knowledge-bases" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

POST /v2/knowledge-bases#

Make a knowledge base, at most 10 per project. Leave out embedding_account_id for keyword search, which needs no setup; name a verified Google or OpenAI account of this project for keyword + meaning search on it.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
OperationcreateKnowledgeBase
Success201 KnowledgeBaseInfo

Request body: KnowledgeBaseCreate.

KnowledgeBaseCreate#

FieldTypeRequiredNotes
descriptionstring or nullno
embedding_account_iduuid or nullno
namestringyes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
409A limit or the resource's state refuses this change; the sentence says which.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/knowledge-bases" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Prices and policies"
  }'

DELETE /v2/knowledge-bases/{base_id}#

Delete the base with its documents and passages. Every agent that read it gets a new version.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
OperationdeleteKnowledgeBase
Success204 no body
ParameterInTypeRequiredNotes
base_idpathuuidyes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

GET /v2/knowledge-bases/{base_id}#

Read one knowledge base.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:read
OperationgetKnowledgeBase
Success200 KnowledgeBaseInfo
ParameterInTypeRequiredNotes
base_idpathuuidyes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

PATCH /v2/knowledge-bases/{base_id}#

Rename it or change its search. Only the fields you send change. The same embedding_account_id again retries what is not fully indexed; another account, or null, reads every document again.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
OperationupdateKnowledgeBase
Success200 KnowledgeBaseInfo
ParameterInTypeRequiredNotes
base_idpathuuidyes

Request body: KnowledgeBaseUpdate.

KnowledgeBaseUpdate#

Fields left out stay as they are; embedding_account_id: null turns meaning-based search off. Saving the SAME embedding_account_id again re-indexes every document that is not fully embedded (the retry after a provider failure); an account with the same provider re-embeds nothing that already has vectors; any other change re-indexes every document.

FieldTypeRequiredNotes
descriptionstring or nullno
embedding_account_iduuid or nullno
namestring or nullno
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
409A limit or the resource's state refuses this change; the sentence says which.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X PATCH "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "embedding_account_id": "<verified google or openai provider account uuid>"
  }'

GET /v2/knowledge-bases/{base_id}/documents#

List the base's documents with status, size and error. Ask again until each is ready or failed.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:read
OperationlistKnowledgeDocuments
Success200 KnowledgeDocumentPage
ParameterInTypeRequiredNotes
base_idpathuuidyes

KnowledgeDocumentPage#

FieldTypeRequiredNotes
dataKnowledgeDocumentInfo[]yes

KnowledgeDocumentInfo#

FieldTypeRequiredNotes
base_iduuidyes
chunk_countintegeryes
content_charsintegeryes
created_atdate-timeyes
embeddedbooleanyes
errorstring or nullyes
iduuidyes
indexed_versioninteger or nullyes
kindstringyes
namestringyes
status"queued" or "indexing" or "ready" or "failed"yes
updated_atdate-timeyes
versionintegeryes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID/documents" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

POST /v2/knowledge-bases/{base_id}/documents#

Add a document, at most 50 per base. It is saved queued and read in the background; agents use it once it is ready.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
OperationcreateKnowledgeDocument
Success201 KnowledgeDocumentInfo
ParameterInTypeRequiredNotes
base_idpathuuidyes
namequerystringyesThe document's name, 1 to 200 characters. A raw upload (text/markdown, text/plain or application/pdf body) is named only by this and is refused without it. A JSON body carries its own name, which is the one used; this parameter is not read for JSON.

Request body: KnowledgeDocumentCreate.

KnowledgeDocumentCreate#

A document as JSON. Raw uploads send the text itself as the body instead.

FieldTypeRequiredNotes
contentstringyesmin length 1; max length 500000
kind"markdown" or "text"nodefault "markdown"
namestringyes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
409A limit or the resource's state refuses this change; the sentence says which.
413The request body is larger than this route accepts; the sentence names the limit.
415This route does not read that Content-Type; the sentence names the ones it does.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.
503A bounded worker this request needs is busy; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID/documents?name=<name>" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "<content>",
    "name": "<name>"
  }'

DELETE /v2/knowledge-bases/{base_id}/documents/{document_id}#

Delete a document and its passages. Agents stop using it at once.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
OperationdeleteKnowledgeDocument
Success204 no body
ParameterInTypeRequiredNotes
base_idpathuuidyes
document_idpathuuidyes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID/documents/$DOCUMENT_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

GET /v2/knowledge-bases/{base_id}/documents/{document_id}#

Read one document, with the text of its latest upload.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:read
OperationgetKnowledgeDocument
Success200 KnowledgeDocumentDetail
ParameterInTypeRequiredNotes
base_idpathuuidyes
document_idpathuuidyes

KnowledgeDocumentDetail#

FieldTypeRequiredNotes
base_iduuidyes
chunk_countintegeryes
contentstringyes
content_charsintegeryes
created_atdate-timeyes
embeddedbooleanyes
errorstring or nullyes
iduuidyes
indexed_versioninteger or nullyes
kindstringyes
namestringyes
status"queued" or "indexing" or "ready" or "failed"yes
updated_atdate-timeyes
versionintegeryes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID/documents/$DOCUMENT_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

PUT /v2/knowledge-bases/{base_id}/documents/{document_id}#

Replace a document's text. The previous version keeps answering until the new one is ready.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
OperationreplaceKnowledgeDocument
Success200 KnowledgeDocumentInfo
ParameterInTypeRequiredNotes
base_idpathuuidyes
document_idpathuuidyes
namequerystringyesThe document's name, 1 to 200 characters. A raw upload (text/markdown, text/plain or application/pdf body) is named only by this and is refused without it. A JSON body carries its own name, which is the one used; this parameter is not read for JSON.

Request body: KnowledgeDocumentCreate.

ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
409A limit or the resource's state refuses this change; the sentence says which.
413The request body is larger than this route accepts; the sentence names the limit.
415This route does not read that Content-Type; the sentence names the ones it does.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.
503A bounded worker this request needs is busy; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X PUT "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID/documents/$DOCUMENT_ID?name=<name>" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "<content>",
    "name": "<name>"
  }'

POST /v2/knowledge-bases/{base_id}/reindex#

Queue every document that is not fully indexed again (202): the retry after a provider failure. Vectors already made are reused, not bought twice.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
OperationreindexKnowledgeBase
Success202 KnowledgeReindexResult
ParameterInTypeRequiredNotes
base_idpathuuidyes

KnowledgeReindexResult#

What POST .../reindex queued. Poll the documents until each is ready or failed.

FieldTypeRequiredNotes
queuedintegeryes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID/reindex" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

POST /v2/knowledge-bases/{base_id}/search#

Try a question: exactly the passages an agent's search_knowledge tool gets on a call, with the mode used and the time taken.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:read
OperationsearchKnowledgeBase
Success200 KnowledgeSearchResult
ParameterInTypeRequiredNotes
base_idpathuuidyes

Request body: KnowledgeSearchRequest.

KnowledgeSearchRequest#

FieldTypeRequiredNotes
querystringyesmin length 2; max length 500

KnowledgeSearchResult#

Exactly what an agent's search_knowledge tool receives for this question, plus timing.

FieldTypeRequiredNotes
elapsed_msintegeryes
mode"hybrid" or "keyword"yes
passagesKnowledgePassage[]yes
status"ok" or "no_match" or "unavailable"yes

KnowledgePassage#

FieldTypeRequiredNotes
documentstringyes
sectionstringyes
textstringyes
ErrorWhen
401No API key was sent in X-Api-Key, or it is invalid or revoked.
403The API key lacks the scope this route needs, or its account or project is unavailable.
404The addressed resource does not exist in this key's project. One in another project is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
429The project's requests-per-minute limit is reached; Retry-After says when to try again.

Plus the machine-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/knowledge-bases/$BASE_ID/search" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What time do you open on Saturday?"
  }'

Operations — account session#

The same resource through the console door. These are what the web console calls; both doors return the same shapes.

GET /console/v2/projects/{project_id}/knowledge-bases#

List the project's knowledge bases with their documents, ready documents, characters and search.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleListKnowledgeBases
Success200 KnowledgeBasePage
ParameterInTypeRequiredNotes
project_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/projects/{project_id}/knowledge-bases#

Make a knowledge base, at most 10 per project. Leave out embedding_account_id for keyword search, which needs no setup; name a verified Google or OpenAI account of this project for keyword + meaning search on it.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleCreateKnowledgeBase
Success201 KnowledgeBaseInfo
ParameterInTypeRequiredNotes
project_idpathuuidyes

Request body: KnowledgeBaseCreate.

ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
409The project or resource is in a state that refuses this change.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Prices and policies"
  }'

DELETE /console/v2/projects/{project_id}/knowledge-bases/{base_id}#

Delete the base with its documents and passages. Every agent that read it gets a new version.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleDeleteKnowledgeBase
Success204 no body
ParameterInTypeRequiredNotes
base_idpathuuidyes
project_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
409The project or resource is in a state that refuses this change.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/projects/{project_id}/knowledge-bases/{base_id}#

Read one knowledge base.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleGetKnowledgeBase
Success200 KnowledgeBaseInfo
ParameterInTypeRequiredNotes
base_idpathuuidyes
project_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

PATCH /console/v2/projects/{project_id}/knowledge-bases/{base_id}#

Rename it or change its search. Only the fields you send change. The same embedding_account_id again retries what is not fully indexed; another account, or null, reads every document again.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleUpdateKnowledgeBase
Success200 KnowledgeBaseInfo
ParameterInTypeRequiredNotes
base_idpathuuidyes
project_idpathuuidyes

Request body: KnowledgeBaseUpdate.

ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
409The project or resource is in a state that refuses this change.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X PATCH "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "embedding_account_id": "<verified google or openai provider account uuid>"
  }'

GET /console/v2/projects/{project_id}/knowledge-bases/{base_id}/documents#

List the base's documents with status, size and error. Ask again until each is ready or failed.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleListKnowledgeDocuments
Success200 KnowledgeDocumentPage
ParameterInTypeRequiredNotes
base_idpathuuidyes
project_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID/documents" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/projects/{project_id}/knowledge-bases/{base_id}/documents#

Add a document, at most 50 per base. It is saved queued and read in the background; agents use it once it is ready.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleCreateKnowledgeDocument
Success201 KnowledgeDocumentInfo
ParameterInTypeRequiredNotes
base_idpathuuidyes
project_idpathuuidyes
namequerystringyesThe document's name, 1 to 200 characters. A raw upload (text/markdown, text/plain or application/pdf body) is named only by this and is refused without it. A JSON body carries its own name, which is the one used; this parameter is not read for JSON.

Request body: KnowledgeDocumentCreate.

ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
409The project or resource is in a state that refuses this change.
413The request body is larger than this route accepts; the sentence names the limit.
415This route does not read that Content-Type; the sentence names the ones it does.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
503A bounded worker this request needs is busy; Retry-After says when to try again.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID/documents?name=<name>" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "<content>",
    "name": "<name>"
  }'

DELETE /console/v2/projects/{project_id}/knowledge-bases/{base_id}/documents/{document_id}#

Delete a document and its passages. Agents stop using it at once.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleDeleteKnowledgeDocument
Success204 no body
ParameterInTypeRequiredNotes
base_idpathuuidyes
document_idpathuuidyes
project_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
409The project or resource is in a state that refuses this change.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID/documents/$DOCUMENT_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/projects/{project_id}/knowledge-bases/{base_id}/documents/{document_id}#

Read one document, with the text of its latest upload.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleGetKnowledgeDocument
Success200 KnowledgeDocumentDetail
ParameterInTypeRequiredNotes
base_idpathuuidyes
document_idpathuuidyes
project_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID/documents/$DOCUMENT_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

PUT /console/v2/projects/{project_id}/knowledge-bases/{base_id}/documents/{document_id}#

Replace a document's text. The previous version keeps answering until the new one is ready.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleReplaceKnowledgeDocument
Success200 KnowledgeDocumentInfo
ParameterInTypeRequiredNotes
base_idpathuuidyes
document_idpathuuidyes
project_idpathuuidyes
namequerystringyesThe document's name, 1 to 200 characters. A raw upload (text/markdown, text/plain or application/pdf body) is named only by this and is refused without it. A JSON body carries its own name, which is the one used; this parameter is not read for JSON.

Request body: KnowledgeDocumentCreate.

ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
409The project or resource is in a state that refuses this change.
413The request body is larger than this route accepts; the sentence names the limit.
415This route does not read that Content-Type; the sentence names the ones it does.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.
503A bounded worker this request needs is busy; Retry-After says when to try again.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X PUT "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID/documents/$DOCUMENT_ID?name=<name>" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "<content>",
    "name": "<name>"
  }'

POST /console/v2/projects/{project_id}/knowledge-bases/{base_id}/reindex#

Queue every document that is not fully indexed again (202): the retry after a provider failure. Vectors already made are reused, not bought twice.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleReindexKnowledgeBase
Success202 KnowledgeReindexResult
ParameterInTypeRequiredNotes
base_idpathuuidyes
project_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
409The project or resource is in a state that refuses this change.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID/reindex" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/projects/{project_id}/knowledge-bases/{base_id}/search#

Try a question: exactly the passages an agent's search_knowledge tool gets on a call, with the mode used and the time taken.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleSearchKnowledgeBase
Success200 KnowledgeSearchResult
ParameterInTypeRequiredNotes
base_idpathuuidyes
project_idpathuuidyes

Request body: KnowledgeSearchRequest.

ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/knowledge-bases/$BASE_ID/search" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What time do you open on Saturday?"
  }'

Try it without a key in the browser

The playground opens a real voice session with your account session, so a project key never reaches a browser. Machine calls belong on your own server.