English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/knowledge/{knowledgeId}/source/{sourceId}Rename a source, or change the text of a text source or the questions and answers of a faq source. A new text or faqs is read again, so the source goes back to process. Fields that are left out keep their value. A source that is still in process can't be changed.
Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Replizknowledge:write| Parameter | Type | Required | Description |
|---|---|---|---|
knowledgeId | string | Yes | ID of the knowledge, the _id from Get Knowledge. |
sourceId | string | Yes | ID of the source, the _id of an item in sources from Get One Knowledge. |
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | New name of the source, cut to 60 characters. |
text | string | No | New text of a text source, up to 200,000 characters. Ignored for other types. |
faqs | array | No | Every question and answer of a faq source, 1 to 300 pairs, replacing the current ones. Ignored for other types. |
To change the page of a url source, read it again with Refresh Knowledge Source. To change a file, remove the source and add the new file.
curl -X PUT "https://api.repliz.com/public/knowledge/680affa5ce12f2f72916f67e/source/680affa5ce12f2f72916f67f" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{
"text": "We ship every weekday. Orders before 3 PM go out the same day."
}'import axios from 'axios';
const knowledgeId = '680affa5ce12f2f72916f67e';
const sourceId = '680affa5ce12f2f72916f67f';
const response = await axios.put(
`https://api.repliz.com/public/knowledge/${knowledgeId}/source/${sourceId}`,
{
text: 'We ship every weekday. Orders before 3 PM go out the same day.',
},
{
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 sourceId = '680affa5ce12f2f72916f67f';
const response = await fetch(`https://api.repliz.com/public/knowledge/${knowledgeId}/source/${sourceId}`, {
method: 'PUT',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'We ship every weekday. Orders before 3 PM go out the same day.',
}),
});
const data = await response.json();
console.log(data);{
"_id": "680affa5ce12f2f72916f67f",
"type": "text",
"name": "Shipping",
"status": "process",
"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
}{
"code": 400,
"message": "knowledge source is still being processed"
}{
"code": 403,
"message": "all knowledge together can hold up to 5000000 characters"
}{
"code": 404,
"message": "knowledge not found"
}
{
"code": 404,
"message": "knowledge source not found"
}{
"code": 401,
"message": "unauthorized"
}