Skip to content

Get One Knowledge Source ​

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

Retrieve a source with its full text or faqs, and its status. Use it to check a new source until it is ready or error.

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.
sourceIdstringYesID of the source, the _id of an item in sources from Get One Knowledge.

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/source/680affa5ce12f2f72916f67f" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from 'axios';

const knowledgeId = '680affa5ce12f2f72916f67e';
const sourceId = '680affa5ce12f2f72916f67f';

const response = await axios.get(`https://api.repliz.com/public/knowledge/${knowledgeId}/source/${sourceId}`, {
  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 sourceId = '680affa5ce12f2f72916f67f';

const response = await fetch(`https://api.repliz.com/public/knowledge/${knowledgeId}/source/${sourceId}`, {
  headers: {
    Authorization: `Basic ${credentials}`,
  },
});

const data = await response.json();
console.log(data);

Response ​

json
{
  "_id": "680affa5ce12f2f72916f67f",
  "type": "text",
  "name": "Shipping",
  "status": "ready",
  "chars": 62,
  "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,
  "text": "We ship every weekday. Orders before 2 PM go out the same day."
}
json
{
  "code": 404,
  "message": "knowledge not found"
}

{
  "code": 404,
  "message": "knowledge source not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}