DocumentationAPI ReferenceChangelog

Envocal API

API Reference API Changelog

Endpoints

List knowledge bases of a tenant GETCreate a knowledge base POSTDelete a knowledge base DELETERename or describe a knowledge base PUTList documents in a knowledge base GETUpload a document POSTDelete a document DELETEGet processing status of documents POST
Knowledge bases

List documents in a knowledge base

Rename or describe a knowledge base PUT

Requires knowledge:write

Upload a document POST

Send multipart/form-data with the document in a file field (e.g. PDF, Word, plain text or Markdown), one document per request, at most 20 MB. The document is processed in the background: poll POST /v1/tenants/{tenantId}/knowledge-bases/{kbId}/documents/status with the returned id until its state is complete.

GET
/v1/tenants/{tenantId}/knowledge-bases/{kbId}/documents

Required permission: knowledge:read

Authorization

Bearer
headerAuthorizationBearer <token>

Tenant API key (evk_…), created in Studio → Vault → API keys.

Path Parameters

tenantId*string

Tenant id, or current for the key's own tenant. Must be the key's tenant or one of its sub-tenants.

kbId*string

Knowledge base id.

Response Body

The documents (empty if the knowledge base is not found in this tenant).

  1. response
  1. response
  2. …
[index: integer]?

A document in a knowledge base.

Example Request
curl -X GET 'https://api.envocal.ai/v1/tenants/string/knowledge-bases/string/documents'
Example Response
[  {    "id": "string",    "fileName": "string",    "mimeType": "string",    "fileSize": 0,    "uploadedUtc": "2019-08-24T14:15:22Z",    "version": 0  }]
Example Request
curl -X GET 'https://api.envocal.ai/v1/tenants/string/knowledge-bases/string/documents'
[
  {
    "id": "string",
    "fileName": "string",
    "mimeType": "string",
    "fileSize": 0,
    "uploadedUtc": "2019-08-24T14:15:22Z",
    "version": 0
  }
]