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}` }; const params = { status: 'LIVE', // or IN_REVIEW, DRAFT question: 'upgrade', answer: 'premium plan', keyword: 'subscription', category: 'Pricing', subcategory: 'Plans', escalation: false, instruction: 'Answer questions related to pricing clearly.' }; axios.get(url, { headers, params }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
{ "knowledgeItems": [ { "id": "2861f1b4-e0f9-44a2-a6bb-3ea7b824d690", "companyId": "ad0d8969-ef32-4cbf-a098-9260baf9c130", "userId": "72fb4eea-207d-43ae-9b4c-274eac4e57d6", "createdAt": "2025-04-02T12:43:15.875146+00:00", "updatedAt": "2025-04-07T22:23:13.114502+00:00", "knowledgeNumber": 239, "status": "DRAFT", "answer": "I've reviewed the check you wrote in about", "question": "Banking- Cancel Check", "similarQs": [], "keywords": [], "categories": [], "subcategories": [], "escalation": false, "updatedBy": "72fb4eea-207d-43ae-9b4c-274eac4e57d6", "instruction": null, "botIds": { "1167ae66-8da3-4765-9f08-fb558232059e": "SUCCESS" } } ] }
This endpoint fetches knowledge items from your Fini workspace based on filters such as status, keyword, category, or escalation settings.
LIVE
IN_REVIEW
DRAFT
Bearer your_api_key_here
Show Toggle object