GET
/
get-knowledge-base
/
{knowledge_base_id}
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
});

async function main() {
  const knowledgeBaseResponse = await client.knowledgeBase.retrieve('kb_1234567890');

  console.log(knowledgeBaseResponse.knowledge_base_id);
}

main();
{
  "knowledge_base_id": "knowledge_base_a456426614174000",
  "knowledge_base_name": "Sample KB",
  "status": "in_progress",
  "knowledge_base_sources": [
    {
      "type": "document",
      "source_id": "<string>",
      "filename": "<string>",
      "file_url": "<string>"
    }
  ],
  "enable_auto_refresh": true,
  "last_refreshed_timestamp": 1703413636133
}

Authorizations

Authorization
string
header
required

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Path Parameters

knowledge_base_id
string
required

The knowledge base id to retrieve.

Response

200
application/json
Successfully retrieved a knowledge base.
knowledge_base_id
string
required

Unique id of the knowledge base.

knowledge_base_name
string
required

Name of the knowledge base. Must be less than 40 characters.

status
enum<string>
required

Status of the knowledge base. When it's created and being processed, it's "in_progress". When the processing is done, it's "complete". When there's an error in processing, it's "error".

Available options:
in_progress,
complete,
error
knowledge_base_sources
object[]

Sources of the knowledge base. Will be populated after the processing is done (when status is "complete").

enable_auto_refresh
boolean

Whether to enable auto refresh for the knowledge base urls. If set to true, will retrieve the data from the specified url every 12 hours.

last_refreshed_timestamp
integer

Last refreshed timestamp (milliseconds since epoch). Only applicable when enable_auto_refresh is true.