Setting up Knowledge Bases via Engaige API

Last updated: March 3, 2026

This guide is for developers and admins who want to manage content sources programmatically via the Engaige API. It covers creating a new source and updating an existing one.

For the full list of available endpoints, see the 📄 Engaige API Reference or browse the interactive docs at api.letsengaige.com/v3/docs.


Authentication

All API requests require an API key. To get one, contact support@letsengaige.com or developer@letsengaige.com.

Include your key as a header in every request:

x-api-key: your_api_key

Creating a source

A source is a folder of documents in your Knowledge Base. Each source maps to one content file. Two formats are supported:

CSV — upload a .csv file with title, content, and source columns:

curl -X POST https://api.letsengaige.com/v2/api/sources/csv \
  -H "x-api-key: your_api_key" \
  -F "file=@/path/to/your/file.csv" \
  -F "name=FAQ Content"

JSON — send documents directly in the request body:

curl -X POST https://api.letsengaige.com/v2/api/sources/json \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "FAQ Content",
    "documents": [
      {
        "title": "How to return an order",
        "content": "To return an order, visit our returns portal...",
        "source": "Returns Policy"
      }
    ]
  }'

The response returns a source_id. Keep it if you plan to replace this source later.

Both formats require the same three fields per document: title, content, and source (case-sensitive). See 📄 Uploading Knowledge in Bulk for field definitions and formatting rules.


Updating an existing source

To replace the content of an existing source, call the same create endpoint (CSV or JSON) with one additional field: replaces_source_id set to the ID of the source you want to replace. The entire previous content is removed and regenerated from the new file.

curl -X POST https://api.letsengaige.com/v2/api/sources/csv \
  -H "x-api-key: your_api_key" \
  -F "file=@/path/to/your/updated_file.csv" \
  -F "replaces_source_id=source_id_to_replace" \
  -F "name=FAQ Content"

Finding the source_id

Two ways to get it:

  1. Dashboard URL: go to Training > Knowledge, open the Knowledge Base, then click the source. The URL contains the source ID: https://platform.letsengaige.com/2025/training/knowledge/{knowledge_base_id}/source/{source_id}

  2. API: call Get Sources (see API reference). The response lists all your sources and their IDs.

curl -X GET https://api.letsengaige.com/v2/api/knowledge-bases/{knowledge_base_id}/sources \
  -H "x-api-key: your_api_key"

Common mistakes

Mistake

How to avoid it

Missing title, content, or source fields

All three are required and case-sensitive. Any variation causes the import to fail.

Creating a new source instead of replacing an existing one

Calling create without replaces_source_id adds a new source rather than updating the existing one. Always include replaces_source_id when updating.