Skip to main content
TypeScript

Authorizations

Authorization
string
header
required

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.

Body

application/json
question
string
required

The question the AI agent should learn the answer to

Minimum string length: 1
Example:

"What is Periskope?"

answer
string
required

The answer to the question

Minimum string length: 1
Example:

"Periskope is a platform to manage WhatsApp at scale."

attachment
object

A single attachment to store with the FAQ. Requires filename plus exactly one content source: file, url or base64.

is_active
boolean

Whether the FAQ is active immediately. Defaults to false — the entry stays inactive until approved.

Example:

false

Response

The created FAQ entry

An entry in the AI knowledge base — the content the AI agent draws on when answering queries. An entry is either an FAQ (a question/answer pair), one chunk of an uploaded PDF document, or a self-learned entry captured automatically from conversations.

context_id
string

Unique id of the knowledge-base entry. For FAQs, this is the id to use with the GET/PATCH/DELETE /knowledge-base/faq/{context_id} routes. Each chunk of an uploaded document has its own context_id.

Example:

"00000000-0000-0000-0000-000000000000"

org_id
string

Id of the organization the entry belongs to

Example:

"00000000-0000-0000-0000-000000000000"

question
string

The question the entry answers. For document chunks this is a derived heading — the document title plus the detected section or question (e.g. "product-faq — Pricing").

Example:

"What is Periskope?"

answer
string

The answer text the AI agent draws on. For document chunks, the extracted text of the chunk.

Example:

"Periskope is a platform to manage WhatsApp at scale."

type
enum<string>

Kind of entry: 'faq' for question/answer pairs created via the API or dashboard, 'document' for chunks extracted from uploaded PDF documents, 'self-learned' for entries the AI agent captured automatically from conversations.

Available options:
faq,
document,
self-learned
Example:

"faq"

embedding
string

Vector embedding of the entry, serialized as a string. Used internally for semantic retrieval — safe to ignore.

Example:

"[-0.0123,0.0456,0.0789,...]"

attachments
any

Attachments stored on the entry — for FAQs created with an attachment, an array of { link: { url, type, name } } objects pointing at the stored file. null or an empty array when the entry has no attachments.

Example:
avg_rating
number

Average rating of AI answers generated from this entry. null when the entry has not been rated.

Example:

null

document_id
string

Id of the uploaded document a chunk belongs to — use it with the GET/DELETE /knowledge-base/document/{document_id} routes. null for FAQs and self-learned entries.

Example:

"00000000-0000-0000-0000-000000000000"

is_active
boolean

Whether the entry is currently used by the AI agent when answering. Entries created via the API start inactive unless is_active is sent as true.

Example:

true

metadata
any

Extra metadata about the entry. For document chunks: fileName, filePath, chunkIndex, tokenCount and the extraction source ('qa' for detected Q&A pairs, 'paragraph' for paragraph blocks, 'text' for sentence windows). null for FAQs.

Example:
tags
string[]

Tags assigned to the entry. null when untagged.

Example:

null

created_at
string

When the entry was created, as an ISO 8601 timestamp

Example:

"2026-01-15T09:30:00.000Z"

updated_at
string

When the entry was last updated, as an ISO 8601 timestamp. null when never updated.

Example:

"2026-01-15T09:30:00.000Z"