Skip to content
Knowledge Base API

FAQs

Create, read, update, and delete FAQ entries — including bulk operations.

On this page

FAQs API#

Use the FAQs API to create, read, update, and delete FAQ entries in your knowledge base. FAQs provide structured Q&A pairs that the AI chatbot uses as reference knowledge.

Endpoints#

MethodPath
GET/knowledge-bases/{kbId}/faqs
GET/knowledge-bases/{kbId}/faqs/{id}
POST/knowledge-bases/{kbId}/faqs
PUT/knowledge-bases/{kbId}/faqs/{id}
DELETE/knowledge-bases/{kbId}/faqs/{id}
POST/knowledge-bases/{kbId}/faqs/bulk
POST/knowledge-bases/{kbId}/faqs/bulk-delete
POST/knowledge-bases/{kbId}/faqs/upsert
POST/knowledge-bases/{kbId}/faqs/reconcile

List FAQs#

Retrieves a paginated list of FAQ entries. Returns up to 100 items per page.

curl "https://api.infinichat.dev/knowledge-bases/{kbId}/faqs?limit=50" \
  -H "X-API-Key: api_your_api_key"

Get a FAQ#

Retrieves a single FAQ entry by ID.

curl https://api.infinichat.dev/knowledge-bases/{kbId}/faqs/{id} \
  -H "X-API-Key: api_your_api_key"

Create a FAQ#

Creates a new FAQ entry. Both question and answer are required.

curl -X POST https://api.infinichat.dev/knowledge-bases/{kbId}/faqs \
  -H "X-API-Key: api_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What is your return policy?",
    "answer": "We offer a 30-day money-back guarantee on all products.",
    "category": "Shipping & Returns"
  }'

Update a FAQ#

Updates an existing FAQ entry. Only include the fields you want to change.

curl -X PUT https://api.infinichat.dev/knowledge-bases/{kbId}/faqs/{id} \
  -H "X-API-Key: api_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "answer": "Updated answer with more details." }'

Delete a FAQ#

Permanently removes a FAQ entry from the knowledge base.

This operation is permanent and cannot be undone. For bulk cleanups, run reconcile in dry-run mode first to preview which records will be removed.

curl -X DELETE https://api.infinichat.dev/knowledge-bases/{kbId}/faqs/{id} \
  -H "X-API-Key: api_your_api_key"

Bulk Create FAQs#

Creates multiple FAQ entries in a single request. Accepts up to 100 items per call.

curl -X POST https://api.infinichat.dev/knowledge-bases/{kbId}/faqs/bulk \
  -H "X-API-Key: api_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      { "question": "Q1?", "answer": "A1." },
      { "question": "Q2?", "answer": "A2." }
    ]
  }'

Bulk Delete FAQs#

Deletes multiple FAQ entries in a single request. Delete by Gydr id, or by your own externalId so you never have to store our ids.

curl -X POST https://api.infinichat.dev/knowledge-bases/{kbId}/faqs/bulk-delete \
  -H "X-API-Key: api_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "ids": ["65f1a2b3c4d5e6f701234567", "65f1a2b3c4d5e6f701234568"] }'

Syncing from another system? Use upsert, not bulk create. Bulk create inserts unconditionally, so running it twice creates two copies of every row. Upsert matches on your own key and is safe to re-run.

Upsert FAQs#

Push a batch of up to 100 FAQ entries, matching existing rows by your own externalId. Fields you omit are left untouched, so a help-centre export can own answers while your team curates categories and keywords in the Console.

matchBy must be "externalId". FAQs are deliberately not matched on their question text: rewording a question would otherwise create a duplicate entry rather than updating the existing one.

curl -X POST https://api.infinichat.dev/knowledge-bases/{kbId}/faqs/upsert \
  -H "X-API-Key: api_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "matchBy": "externalId",
    "items": [
      { "externalId": "faq-shipping", "answer": "We ship within 2 working days." }
    ]
  }'

One bad row never fails the batch, and a failed row is not charged. A created or updated FAQ is not answerable until a sync runs — see Sync & Embedding.

Reconcile FAQs#

Supply your complete FAQ feed and the API deletes every stored entry whose externalId is absent from it. Three guards prevent accidental mass deletion:

  • mode is required — there is no default. "dry-run" returns a preview without touching data. "apply" performs the deletions.
  • confirm must equal the target knowledge-base id when applying, so a copy-pasted call against the wrong knowledge base fails closed.
  • maxDeletionPercent (default 20, ceiling 50) aborts the call if planned deletions exceed that percentage of the live catalogue.
curl -X POST https://api.infinichat.dev/knowledge-bases/{kbId}/faqs/reconcile \
  -H "X-API-Key: api_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "matchBy": "externalId",
    "keys": ["faq-shipping", "faq-returns", "faq-warranty"],
    "mode": "dry-run"
  }'

We use cookies to run and improve Gydr.

Read our Cookie Policy