English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/knowledge/{knowledgeId}Retrieve a knowledge with its sources and where it is used.
Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Replizknowledge:read| Parameter | Type | Required | Description |
|---|---|---|---|
knowledgeId | string | Yes | ID of the knowledge, the _id from Get Knowledge. |
| Field | Type | Description |
|---|---|---|
knowledge | object | The knowledge, as in Get Knowledge. |
sources | array | Its sources, newest first, without the full text of text sources. See Source Object. |
usage | object | How many accounts, content automations, and templates have it in knowledgeIds. |
| Field | Type | Description |
|---|---|---|
_id | string | ID of the source. |
type | string | text, faq, url, or file. |
name | string | Name of the source. |
text | string | The text of a text source. Only in Get One Knowledge Source. |
faqs | array | The { question, answer } pairs of a faq source. |
url | string | The page of a url source. |
file | object | The name, mimetype, and size of a file source. file.url is emptied once the file has been read. |
status | string | process while it is being read, then ready or error. |
chars | number | Characters read from the source, 0 until it is ready. |
errorMessage | string | Why reading failed, when status is error, for example website answered with status 404 or no text found. |
processedAt | string | When it was last read. |
knowledgeId | string | ID of the knowledge it belongs to. |
curl -X GET "https://api.repliz.com/public/knowledge/680affa5ce12f2f72916f67e" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"import axios from 'axios';
const knowledgeId = '680affa5ce12f2f72916f67e';
const response = await axios.get(`https://api.repliz.com/public/knowledge/${knowledgeId}`, {
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
});
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const knowledgeId = '680affa5ce12f2f72916f67e';
const response = await fetch(`https://api.repliz.com/public/knowledge/${knowledgeId}`, {
headers: {
Authorization: `Basic ${credentials}`,
},
});
const data = await response.json();
console.log(data);{
"knowledge": {
"_id": "680affa5ce12f2f72916f67e",
"name": "Product catalog",
"description": "Prices, stock and shipping",
"chars": 18250,
"sourceCount": 3,
"userId": "680affa5ce12f2f72916f600",
"createdAt": "2026-11-14T03:00:00.000Z",
"updatedAt": "2026-11-14T03:05:00.000Z",
"__v": 0
},
"sources": [
{
"_id": "680affa5ce12f2f72916f67f",
"type": "url",
"name": "Shipping",
"url": "https://example.com/shipping",
"status": "ready",
"chars": 4200,
"processedAt": "2026-11-14T03:05:00.000Z",
"knowledgeId": "680affa5ce12f2f72916f67e",
"userId": "680affa5ce12f2f72916f600",
"createdAt": "2026-11-14T03:04:00.000Z",
"updatedAt": "2026-11-14T03:05:00.000Z",
"__v": 0
},
{
"_id": "680affa5ce12f2f72916f681",
"type": "file",
"name": "catalog.pdf",
"file": {
"url": "",
"name": "catalog.pdf",
"mimetype": "application/pdf",
"size": 102400
},
"status": "ready",
"chars": 12600,
"processedAt": "2026-11-14T03:03:00.000Z",
"knowledgeId": "680affa5ce12f2f72916f67e",
"userId": "680affa5ce12f2f72916f600",
"createdAt": "2026-11-14T03:02:00.000Z",
"updatedAt": "2026-11-14T03:03:00.000Z",
"__v": 0
},
{
"_id": "680affa5ce12f2f72916f682",
"type": "faq",
"name": "FAQ",
"status": "ready",
"chars": 1450,
"faqs": [
{
"question": "Do you ship abroad?",
"answer": "Yes, to most countries."
}
],
"processedAt": "2026-11-14T03:01:00.000Z",
"knowledgeId": "680affa5ce12f2f72916f67e",
"userId": "680affa5ce12f2f72916f600",
"createdAt": "2026-11-14T03:01:00.000Z",
"updatedAt": "2026-11-14T03:01:00.000Z",
"__v": 0
}
],
"usage": {
"accounts": 2,
"automations": 1,
"templates": 0
}
}{
"code": 404,
"message": "knowledge not found"
}{
"code": 401,
"message": "unauthorized"
}