Skip to content

Refresh Knowledge Source ​

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

Read a url source again, for example after the page changed. The source goes back to process and its text is replaced once the page is read. Only url sources can be refreshed.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Repliz
  • Scope (Bearer only): knowledge:write
  • 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.

Example Request ​

bash
curl -X POST "https://api.repliz.com/public/knowledge/680affa5ce12f2f72916f67e/source/680affa5ce12f2f72916f67f/refresh" \
  -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.post(
  `https://api.repliz.com/public/knowledge/${knowledgeId}/source/${sourceId}/refresh`,
  {},
  {
    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}/refresh`, {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
  },
});

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

Response ​

json
{
  "_id": "680affa5ce12f2f72916f67f",
  "type": "url",
  "name": "Shipping",
  "url": "https://example.com/shipping",
  "status": "process",
  "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
}
json
{
  "code": 400,
  "message": "only a website source can be refreshed"
}

{
  "code": 400,
  "message": "knowledge source is still being processed"
}
json
{
  "code": 404,
  "message": "knowledge not found"
}

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