Skip to content

Create Knowledge ​

POSThttps://api.repliz.com/public/knowledge

Create an empty knowledge, then add what it should know with Create Knowledge Source.

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+

Request Body ​

FieldTypeRequiredDescription
namestringYesName of the knowledge, up to 100 characters, for example Product catalog.
descriptionstringNoWhat the knowledge is about, up to 500 characters.

Example Request ​

bash
curl -X POST "https://api.repliz.com/public/knowledge" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product catalog",
    "description": "Prices, stock and shipping"
  }'
javascript
import axios from 'axios';

const response = await axios.post(
  'https://api.repliz.com/public/knowledge',
  {
    name: 'Product catalog',
    description: 'Prices, stock and shipping',
  },
  {
    auth: {
      username: 'YOUR_ACCESS_KEY',
      password: 'YOUR_SECRET_KEY',
    },
  },
);

console.log(response.data);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const response = await fetch('https://api.repliz.com/public/knowledge', {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Product catalog',
    description: 'Prices, stock and shipping',
  }),
});

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

Response ​

json
{
  "_id": "680affa5ce12f2f72916f67e",
  "name": "Product catalog",
  "description": "Prices, stock and shipping",
  "chars": 0,
  "sourceCount": 0,
  "userId": "680affa5ce12f2f72916f600",
  "createdAt": "2026-11-14T03:00:00.000Z",
  "updatedAt": "2026-11-14T03:00:00.000Z",
  "__v": 0
}
json
{
  "code": 403,
  "message": "you can have up to 100 knowledge"
}
json
{
  "code": 401,
  "message": "unauthorized"
}