POST
/
v2
/
knowledge-items
/
public
const axios = require('axios');

const url = 'https://api-prod.usefini.com/v2/knowledge-items/public';
const token = 'your_api_key_here'; // Replace with your actual API key

const headers = {
  'authorization': `Bearer ${token}`,
  'Content-Type': 'application/json'
};

const data = {
  botIds: ['1167ae66-8dg3-4765-9f08-fb558232089t'],
  status: 'LIVE',
  question: 'check2',
  answer: 'check',
  instruction: null,
  similarQs: ['similar question'],
  keywords: ['keyword 2'],
  categories: ['Hello2'],
  subcategories: ['Hello'],
  escalation: false
};

axios.post(url, data, { headers })
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error('Error:', error);
  });
{
  "id": "ce99afbb-9f3a-4697-81e8-4858f48895e2",
  "companyId": "ad0d8969-ef32-4cbf-a098-9260baf9c130",
  "userId": "72fb4eea-207d-43ae-9b4c-274eac4e57d6",
  "createdAt": "2025-04-08T13:48:22.917514+00:00",
  "updatedAt": "2025-04-08T13:48:22.917514+00:00",
  "knowledgeNumber": 240,
  "status": "LIVE",
  "answer": "check",
  "question": "check2",
  "similarQs": ["similar question"],
  "keywords": ["keyword 2"],
  "categories": ["Hello2"],
  "subcategories": ["Hello"],
  "escalation": false,
  "updatedBy": "72fb4eea-207d-43ae-9b4c-274eac4e57d6",
  "instruction": null
}

Headers

Authorization
string
required
API key for authentication. Format: Bearer your_api_key_here.

Body Parameters

botIds
array[string]
required
List of bot IDs that this knowledge item should be associated with.
status
string
required
Status of the item. Valid values: LIVE, IN_REVIEW, DRAFT.
question
string
required
The main question this knowledge item addresses.
answer
string
required
The answer to the question.
instruction
string
required
Instruction associated with the item, used for bot training or human review.
similarQs
array[string]
required
List of similar questions to the main question.
keywords
array[string]
required
List of keywords to help with search and categorization.
categories
array[string]
required
Categories under which the item is grouped.
subcategories
array[string]
required
Subcategories under which the item is grouped.
escalation
boolean
required
Whether this item is marked for escalation.

Response

id
string
Unique ID of the created knowledge item.
companyId
string
ID of the company that owns the knowledge item.
userId
string
ID of the user who created the knowledge item.
createdAt
string
Timestamp of when the item was created.
updatedAt
string
Timestamp of the last update to the item.
knowledgeNumber
integer
Auto-generated knowledge number.
status
string
Status of the item: LIVE, IN_REVIEW, or DRAFT.
answer
string
The answer text.
question
string
The question text.
similarQs
array[string]
List of similar questions.
keywords
array[string]
Keywords associated with the knowledge item.
categories
array[string]
Categories under which the item is grouped.
subcategories
array[string]
Subcategories under which the item is grouped.
escalation
boolean
Whether the item is marked for escalation.
updatedBy
string
ID of the user who last updated the item.
instruction
string
Instruction associated with the item.
const axios = require('axios');

const url = 'https://api-prod.usefini.com/v2/knowledge-items/public';
const token = 'your_api_key_here'; // Replace with your actual API key

const headers = {
  'authorization': `Bearer ${token}`,
  'Content-Type': 'application/json'
};

const data = {
  botIds: ['1167ae66-8dg3-4765-9f08-fb558232089t'],
  status: 'LIVE',
  question: 'check2',
  answer: 'check',
  instruction: null,
  similarQs: ['similar question'],
  keywords: ['keyword 2'],
  categories: ['Hello2'],
  subcategories: ['Hello'],
  escalation: false
};

axios.post(url, data, { headers })
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error('Error:', error);
  });
{
  "id": "ce99afbb-9f3a-4697-81e8-4858f48895e2",
  "companyId": "ad0d8969-ef32-4cbf-a098-9260baf9c130",
  "userId": "72fb4eea-207d-43ae-9b4c-274eac4e57d6",
  "createdAt": "2025-04-08T13:48:22.917514+00:00",
  "updatedAt": "2025-04-08T13:48:22.917514+00:00",
  "knowledgeNumber": 240,
  "status": "LIVE",
  "answer": "check",
  "question": "check2",
  "similarQs": ["similar question"],
  "keywords": ["keyword 2"],
  "categories": ["Hello2"],
  "subcategories": ["Hello"],
  "escalation": false,
  "updatedBy": "72fb4eea-207d-43ae-9b4c-274eac4e57d6",
  "instruction": null
}