Skip to content

Remove Knowledge Source ​

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

Remove a source from a knowledge. The AI stops using what it held right away.

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 DELETE "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.delete(`https://api.repliz.com/public/knowledge/${knowledgeId}/source/${sourceId}`, {
  auth: {
    username: 'YOUR_ACCESS_KEY',
    password: 'YOUR_SECRET_KEY',
  },
});

console.log(response.status);
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}`, {
  method: 'DELETE',
  headers: {
    Authorization: `Basic ${credentials}`,
  },
});

console.log(response.status);

Response ​

json
// No content returned on success
json
{
  "code": 404,
  "message": "knowledge not found"
}

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