TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.knowledgeBase.listKnowledgeBase();
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/knowledge-base' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"data": [
{
"context_id": "00000000-0000-0000-0000-000000000000",
"org_id": "00000000-0000-0000-0000-000000000000",
"question": "What is Periskope?",
"answer": "Periskope is a platform to manage WhatsApp at scale.",
"type": "faq",
"embedding": "[-0.0123,0.0456,0.0789,...]",
"attachments": [
{
"link": {
"url": "org-assets/00000000-0000-0000-0000-000000000000/ai_assets/00000000-0000-0000-0000-000000000000/pricing.pdf",
"type": "application/pdf",
"name": "pricing.pdf"
}
}
],
"avg_rating": null,
"document_id": "00000000-0000-0000-0000-000000000000",
"is_active": true,
"metadata": {
"fileName": "product-faq.pdf",
"chunkIndex": 1,
"tokenCount": 180,
"source": "qa"
},
"tags": null,
"created_at": "2026-01-15T09:30:00.000Z",
"updated_at": "2026-01-15T09:30:00.000Z"
}
],
"count": 135
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Knowledge Base APIs
Get All Knowledge Base Items
Returns every entry in the AI knowledge base — FAQs, document chunks and self-learned entries — newest first.
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.knowledgeBase.listKnowledgeBase();
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/knowledge-base' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"data": [
{
"context_id": "00000000-0000-0000-0000-000000000000",
"org_id": "00000000-0000-0000-0000-000000000000",
"question": "What is Periskope?",
"answer": "Periskope is a platform to manage WhatsApp at scale.",
"type": "faq",
"embedding": "[-0.0123,0.0456,0.0789,...]",
"attachments": [
{
"link": {
"url": "org-assets/00000000-0000-0000-0000-000000000000/ai_assets/00000000-0000-0000-0000-000000000000/pricing.pdf",
"type": "application/pdf",
"name": "pricing.pdf"
}
}
],
"avg_rating": null,
"document_id": "00000000-0000-0000-0000-000000000000",
"is_active": true,
"metadata": {
"fileName": "product-faq.pdf",
"chunkIndex": 1,
"tokenCount": 180,
"source": "qa"
},
"tags": null,
"created_at": "2026-01-15T09:30:00.000Z",
"updated_at": "2026-01-15T09:30:00.000Z"
}
],
"count": 135
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Authorizations
Your Periskope API token, sent as Authorization: Bearer <token>. Generate one from the Periskope dashboard under Settings → API & Webhooks. API access requires an active Pro or Enterprise plan.
Query Parameters
Number of records to skip before the first returned record. Use together with limit to paginate: page N is offset = N * limit. Defaults to 0.
Required range:
x >= 0Example:
0
Maximum number of entries to return in one page. Defaults to 1000; cannot exceed 2000.
Required range:
1 <= x <= 2000Example:
1000
Return only entries of one kind: 'faq', 'document' (chunks of uploaded PDFs) or 'self-learned'. Omit to return every entry.
Available options:
faq, document, self-learned Example:
"faq"
Was this page helpful?