Skip to content

Get One Knowledge ​

GEThttps://api.repliz.com/public/knowledge/{knowledgeId}

Retrieve a knowledge with its sources and where it is used.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Repliz
  • Scope (Bearer only): knowledge:read
  • Access Tier: Standard+

Parameters ​

ParameterTypeRequiredDescription
knowledgeIdstringYesID of the knowledge, the _id from Get Knowledge.

Response Fields ​

FieldTypeDescription
knowledgeobjectThe knowledge, as in Get Knowledge.
sourcesarrayIts sources, newest first, without the full text of text sources. See Source Object.
usageobjectHow many accounts, content automations, and templates have it in knowledgeIds.

Source Object ​

FieldTypeDescription
_idstringID of the source.
typestringtext, faq, url, or file.
namestringName of the source.
textstringThe text of a text source. Only in Get One Knowledge Source.
faqsarrayThe { question, answer } pairs of a faq source.
urlstringThe page of a url source.
fileobjectThe name, mimetype, and size of a file source. file.url is emptied once the file has been read.
statusstringprocess while it is being read, then ready or error.
charsnumberCharacters read from the source, 0 until it is ready.
errorMessagestringWhy reading failed, when status is error, for example website answered with status 404 or no text found.
processedAtstringWhen it was last read.
knowledgeIdstringID of the knowledge it belongs to.

Example Request ​

bash
curl -X GET "https://api.repliz.com/public/knowledge/680affa5ce12f2f72916f67e" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
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);
javascript
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);

Response ​

json
{
  "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
  }
}
json
{
  "code": 404,
  "message": "knowledge not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}