Contents
The Content model
Key / Type / Description
_id (String) — The unique identifier for the contents which is given by Tiledesk.
name (String) — The content name.
id_project (String) — The unique identifier of the project.
type (String) — The type of the content. Supported types: url, text, pdf, docx, faq.
source (String) — The content source.
content (String) — The textual content of a source. Is empty if the type is not text.
namespace (String) — The namespace id to which the content belongs.
status (Number) — The content status. Admissible status: -1 (not in queue), 100 (in queue), 200 (in indexing), 300 (indexed), 400 (error).
Get all contents of a knowledge base
GET https://api.tiledesk.com/v3/:project_id/kb/
Allows to list all the content of a knowledge base.
Path parameters
project_id (string) — The Project Id assigned to your project in Tiledesk.
Query parameters
namespace (string) — The Namespace Id assigned to your knowledge base.
status (number) — (Optional) To list all content in a determined indexing status.
type (string) — (Optional) To list all content of a determined type.
limit (number) — (Optional) Determines the number of contents returned (pagination).
page (number) — (Optional) Determines the page number (pagination).
sortField (string) — (Optional) Field on which to sort.
direction (number) — (Optional) Sorting direction. -1 (descending), 1 (ascending).
search (string) — (Optional) Text to search for in the source field.
Headers
Authorization (string) — Authorization token. Basic Auth or JWT.
200 response example
Example
Get content detail
GET https://api.tiledesk.com/v3/:project_id/kb/:content_id
Allows to get the content detail.
Path parameters
project_id (string) — The Project Id assigned to your project in Tiledesk.
content_id (string) — The content Id assigned to your content.
Headers
Authorization (string) — Authorization token. Basic Auth or JWT.
200 response example
Example
Add a content to a knowledge base
POST https://api.tiledesk.com/v3/:project_id/kb/
Allows to create and add a content to a specific knowledge base.
Path parameters
project_id (string) — The Project Id assigned to your project in Tiledesk.
Headers
Authorization (string) — Authorization token. Basic Auth or JWT.
Request body
name (string) — The name of the content.
type (string) — The content type: text, url, pdf, docx or faq.
source (string) — The source name of a content. If the content type is url, pdf or docx the source field must be the resource's url.
content (string) — The content field. Empty if the type is url, pdf or docx. If type is faq the content should be "Question\nAnswer".
namespace (string) — The namespace id to which the content belongs.
200 response example
Example
Add multiple URL contents to a knowledge base
POST https://api.tiledesk.com/v3/:project_id/kb/multi
Allows to add more than one content of type url to a specific knowledge base in a single operation.
Path parameters
project_id (string) — The Project Id assigned to your project in Tiledesk.
Query parameters
namespace (string) — The Namespace Id assigned to your knowledge base.
Headers
Authorization (string) — Authorization token. Basic Auth or JWT.
Request body
list (array) — The array of URLs to be added to the knowledge base.
200 response example
Example
Convert a sitemap into a list of URLs
POST https://api.tiledesk.com/v3/:project_id/kb/sitemap
Allows to convert a sitemap into a list of URLs to be uploaded later in a single operation.
Path parameters
project_id (string) — The Project Id assigned to your project in Tiledesk.
Headers
Authorization (string) — Authorization token. Basic Auth or JWT.
Request body
sitemap (string) — The sitemap URL to convert.
200 response example
Example
Delete a content from the knowledge base
DELETE https://api.tiledesk.com/v3/:project_id/kb/:content_id
Allows to delete a single content from the knowledge base.
Path parameters
project_id (string) — The Project Id assigned to your project in Tiledesk.
content_id (string) — The Content Id assigned to your content.
Headers
Authorization (string) — Authorization token. Basic Auth or JWT.
200 response example
Example
Links
Knowledge Base list: https://developer.tiledesk.com/apis/rest-api/knowledge-bases/kbs
Question & Answer: https://developer.tiledesk.com/apis/rest-api/knowledge-bases/qa
Last updated 1 year ago
Privacy
This documentation references the Tiledesk privacy policy: https://tiledesk.com/privacy.html