Tiledesk Developer Hub
WebsiteCommunityTutorialsGet started
  • Introduction
  • Community
  • Ask for Support
  • Public Roadmap and Changelog
  • Tutorials
  • Widget
    • Widget SDK
    • Javascript API: Methods
    • Javascript API: Attributes
    • Javascript API: Listeners/Events
    • Widget Authentication
    • Widget Angular integration
    • Widget React integration
    • Widget for Android with WebView
    • Widget for iOS with WKWebView
    • Widget for Flutter with WebView
    • Widget for React with WebView
    • Widget for Wix Website platform
    • Tutorials
      • Hide widget
      • Show/Hide widget programmatically
      • Force widget loading without user interaction
      • Mobile positioning
      • Custom size (width/height)
      • Installing widget on selected pages
    • Conversation Embedded Apps
      • Payment App Tutorial
      • Prechat form App Tutorial
    • Advanced
      • Preset the Widget on a specific Department
      • Authentication Flow
      • Widget protocol specs
      • Prechat Form JSON specs
      • Prevent multiple conversations
      • Old versions
        • Web SDK v4
  • External Chatbot
    • Introduction
    • Hello World tutorial
    • Chatbot to Human handoff
    • Send Text Buttons
    • Advanced Tutorials
      • Introduction
      • Tutorial 1 - Dialogflow as external chatbot
      • Tutorial 2 - Buttons and images
      • Tutorial 3 - Automatic human handoff with fallback intent
      • Tutorial 4 - Explicit Human handoff with user intent
      • Tutorial 5 - Gracefully handling operating hours during handoff
      • Generate Dialogflow Google Credentials file
    • Rasa tutorials
      • Rasa Tutorial 1 - Rasa as external chatbot
  • Resolution bot
    • Introduction
    • Quickstart
    • Webhook service
    • Rich messages
    • Tutorials
      • Chatbot chooser (multilanguage)
      • Department chooser
      • Order info (webhook)
  • APIs
    • REST APIs
      • Introduction
      • Authentication
      • Requests
      • Leads
      • Messages
      • Activities
      • Projects
      • Team
      • User
      • Analytics
      • Canned responses
      • Tags
      • Events
      • Jwt
      • Labels
      • Images
      • Files
      • Segments
      • Chatbots
      • Knowledge Bases
        • Knowledge Base
        • Contents
        • Question & Answer
      • Management Api
        • Departments
        • Groups
    • NodeJS SDK
    • Webhooks
      • Subscriptions
    • Conversation Messages APIs tips
    • Realtime API
    • JWT Authentication
      • JWT Custom authentication Tutorial
    • Tutorials
      • REST API
        • Sending and receiving messages with Tiledesk APIs
        • PHP Tiledesk REST API example
        • Import multiple messages into Tiledesk using REST APIs from third party app
      • Webhooks
        • Custom Request assignment
        • Request transcript on close
  • Apps
    • Build Custom App - Quick start
    • External Channels integration flow diagram
    • Telegram integration tutorial
  • Dashboard & AgentChat SDK
    • Dashboard SDK
    • Agent Chat SDK
  • Architecture
    • Architecture overview
    • Components list
    • Bot Design diagram
    • Multi Channel Message Flow
  • Installation
    • Installation
    • Running Tiledesk using Docker Compose
    • Running Tiledesk with Kubernetes using Helm
    • Choosing Hardware
  • Configuration
    • Chat21 channel configuration
    • Email parameters and templates configuration
    • Configure the logging system
Powered by GitBook
On this page
  • The Knowledge Base model
  • Get all knowledge bases
  • Create new knowledge base
  • Update a knowledge base
  • Delete a knowledge base

Was this helpful?

  1. APIs
  2. REST APIs
  3. Knowledge Bases

Knowledge Base

PreviousKnowledge BasesNextContents

Last updated 7 months ago

Was this helpful?

Manage contents for your chatbot instant replies using our RAG engine. Populate your KBs using your own contents (URLs, sitemaps, pdfs, docx, text or FAQs). Our semantic engine will help you provide the best answers based on user questions using advanced Semantic indexing and the OpenAI generative AI.

The Knowledge Base model

Key
Type
Description

id

String

The unique identifier for the knowledge base which is given by Tiledesk.

name

String

The knowledge base name.

id_project

String

The unique identifier of the project

preview_settings

Object

The settings for the knowledge base preview

default

Boolean

Specify if the knowledge base is the default one

Get all knowledge bases

GET https://api.tiledesk.com/v3/:project_id/kb/namespace/all

Allows to list all the knowledge bases of a project. Returns at least the default knowledge base.

Path Parameters

Name
Type
Description

project_id

string

The Project Id is a unique code assigned to your project when you create it in Tiledesk.

Headers

Name
Type
Description

Authorization

string

Authorization token. Basic Auth or JWT

[
    {
        "default": true,
        "id_project": "63ad512e70d5ed0012ad6286",
        "id": "63ad512e70d5ed0012ad6286",
        "name": "Customer Support",
        "preview_settings": {
            "model": "gpt-3.5-turbo",
            "max_tokens": 128,
            "temperature": 0.7,
            "top_k": 4,
            "context": "You are an awesome AI Assistant."
        },
        "createdAt": "2024-06-20T13:49:04.006Z",
        "updatedAt": "2024-06-21T10:52:55.235Z"
    },
    {
        "default": false,
        "id_project": "63ad512e70d5ed0012ad6286",
        "id": "66755b6b9fee7f001357bc7f",
        "name": "Sales",
        "preview_settings": {
            "model": "gpt-3.5-turbo",
            "max_tokens": 128,
            "temperature": 0.7,
            "top_k": 4,
            "context": "You are an awesome AI Assistant."
        },
        "createdAt": "2024-06-21T10:52:27.111Z",
        "updatedAt": "2024-06-21T10:52:27.111Z"
    }
]

Example

curl -v -X GET -u giovanni@tiledesk.com:password https://api.tiledesk.com/v3/63ad512e70d5ed0012ad6286/kb/namespace/all

Create new knowledge base

POST https://api.tiledesk.com/v3/:project_id/kb/namespace

Allows to create a new knowledge base for a project.

Path Parameters

Name
Type
Description

project_id

string

The Project Id is a unique code assigned to your project when you create it in Tiledesk.

Headers

Name
Type
Description

Authorization

string

Authorization token. Basic Auth or JWT

Request Body

Name
Type
Description

name

string

The name of the knowledge base.

{
    "default": false,
    "id_project": "63ad512e70d5ed0012ad6286",
    "id": "6675a1b3c08d0b00141c415b",
    "name": "Products",
    "preview_settings": {
        "model": "gpt-3.5-turbo",
        "max_tokens": 128,
        "temperature": 0.7,
        "top_k": 4,
        "context": "You are an awesome AI Assistant."
    },
    "createdAt": "2024-06-21T15:52:19.036Z",
    "updatedAt": "2024-06-21T15:52:19.036Z"
}

Example

curl -v -X GET -u giovanni@tiledesk.com:password -d '{"name": "Products"}' https://api.tiledesk.com/v3/63ad512e70d5ed0012ad6286/kb/namespace

Update a knowledge base

PUT https://api.tiledesk.com/v3/:project_id/kb/namespace/:id

Allows to update a knowledge base info and preview settings.

Path Parameters

Name
Type
Description

project_id

string

The Project Id is a unique code assigned to your project when you create it in Tiledesk.

id

string

The unique identifier for the knowledge base

Headers

Name
Type
Description

Authorization

string

Authorization token. Basic Auth or JWT

Request Body

Name
Type
Description

name

string

The name of the knowledge base.

preview_settings

object

The AI settings for the knowledge base settings.

{
    "default": false,
    "id_project": "63ad512e70d5ed0012ad6286",
    "id": "6675a1b3c08d0b00141c415b",
    "name": "New Products",
    "preview_settings": {
        "model": "gpt-4o",
        "max_tokens": 256,
        "temperature": 0.5,
        "top_k": 5,
        "context": "Custom context."
    },
    "createdAt": "2024-06-21T15:52:19.036Z",
    "updatedAt": "2024-06-24T08:37:32.313Z"
}

Example

curl -v -X PUT -u giovanni@tiledesk.com:password -d '{"name": "New Products", "preview_settings": { "model": "gpt-4o", "max_tokens": 256, "temperature": 0.5, "top_k": 5,"context": "Custom context." }}' 
https://api.tiledesk.com/v3/63ad512e70d5ed0012ad6286/kb/namespace/6675a1b3c08d0b00141c415b

Delete a knowledge base

DELETE https://api.tiledesk.com/v3/:project_id/kb/namespace/:id

Allows to delete the whole knowledge base or it's contents only.

Path Parameters

Name
Type
Description

project_id

string

The Project Id is a unique code assigned to your project when you create it in Tiledesk.

id

string

The unique identifier for the knowledge base

Query Parameters

Name
Type
Description

contents_only

boolean

(Optional) if TRUE will be deleted only the contents

Headers

Name
Type
Description

Authorization

string

Authorization token. Basic Auth or JWT

{
    "success": true,
    "message": "Namespace deleted succesfully"
}

Example


curl -v -X DELETE -u giovanni@tiledesk.com:password -d https://api.tiledesk.com/v3/63ad512e70d5ed0012ad6286/kb/namespace/6675a1b3c08d0b00141c415b
More info