> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ringg.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To search or read these docs, connect the Ringg docs MCP server at https://docs.ringg.ai/mcp (no key needed; tools search_ringg_ai and query_docs_filesystem_ringg_ai) instead of browsing pages one by one. Setup for each client: https://docs.ringg.ai/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants.md
> The dashboard labels agents "Assistants"; these docs say "agent". Both mean the same object, identified by agent_id.
> API base URL: https://prod-api.ringg.ai/ca/api/v0. Send the workspace API key in the X-API-KEY header, from server-side code only.
> Placing a call dials a real phone number and spends credits. Confirm the number with the user before calling.
> To act on a Ringg workspace (place calls, edit agents, read transcripts), use the separate Ringg workspace MCP server at https://mcp.ringg.ai/mcp: https://docs.ringg.ai/resources/mcp-server/workspace-mcp-server/overview.md

> Create a knowledge base from files, web page URLs and FAQ pairs, processed in the background, then attach it to an agent so it can answer from that content.

# Create Knowledge Base

export const RelatedTopics = ({items}) => <div className="not-prose mt-12">
    <div className="text-sm font-medium text-gray-500 dark:text-zinc-400 mb-3">Related topics</div>
    <div className="flex flex-col gap-2.5">
      {items.map(([title, href]) => <a key={href} href={href} className="flex items-center gap-2.5 text-sm text-gray-700 hover:text-gray-950 dark:text-zinc-300 dark:hover:text-white">
          <Icon icon="file-text" size={16} color="currentColor" />
          {title}
        </a>)}
    </div>
  </div>;

The response returns its `kb_id` with `processing_status` `pending`; poll [Get knowledge base](/api-reference/inventory/knowledge-bases/get-knowledge-base-by-id) until `status` is `completed`, then attach it to an agent with the `attach_kb` operation of [Edit agent settings](/api-reference/agents/edit-assistant).

## Content

Send `kb_name` and any mix of `files`, `urls` and `faqs`; each FAQ is a `{"question", "answer"}` object. One request takes up to 10 files (2 MB each, 5 MB in total) and 20 URLs.

Files are read by extension: PDF, DOCX, TXT, CSV (one entry per row) and JSON. Any other extension, such as `.md`, is read as plain text.

Knowledge bases created with the API are not listed on the dashboard's **Knowledge Base** page. They do appear in the agent editor's knowledge base picker and in [Get all knowledge bases](/api-reference/inventory/knowledge-bases/get-all-knowledge-bases), which also lists the ones made in the dashboard.

```bash theme={null}
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/external/kb" \
  --header "X-API-KEY: $RINGG_API_KEY" \
  --form 'kb_name="Acme Lending FAQ"' \
  --form 'urls="[\"https://example.com/faq\"]"' \
  --form 'faqs="[{\"question\": \"Can I pay my EMI early?\", \"answer\": \"Yes, from the Acme app under Loans.\"}]"' \
  --form "files=@loan-terms.pdf"
```

<RelatedTopics items={[["Edit knowledge base", "/api-reference/inventory/knowledge-bases/edit-knowledge-base"]]} />


## OpenAPI

````yaml post /external/kb
openapi: 3.0.0
info:
  title: Ringg AI API Documentation
  description: >-
    The Ringg AI REST API. Base URL https://prod-api.ringg.ai/ca/api/v0; send
    your workspace API key in the X-API-KEY header from server-side code only.
    Requests and responses are JSON.
  version: 2.0.0
  contact:
    name: Ringg AI support
    email: admin@ringg.ai
    url: https://docs.ringg.ai
servers:
  - url: https://prod-api.ringg.ai/ca/api/v0
security: []
tags:
  - name: workspace
    description: Endpoints for managing your workspace.
  - name: agent
    description: Endpoints for managing agents.
  - name: calling
    description: Endpoints for making and managing calls.
  - name: campaign
    description: Endpoints for managing campaigns.
  - name: analytics
    description: Endpoints for accessing call analytics and performance metrics.
  - name: termination
    description: Endpoints for terminating active calls using different methods.
  - name: knowledgebase
    description: Endpoints for managing knowledge bases.
paths:
  /external/kb:
    post:
      tags:
        - knowledgebase
      summary: Create Knowledge Base
      description: >-
        Creates a new non-deterministic knowledge base. Rate limit: 10 requests
        per hour per workspace. File size limit: 2 MB per file, 5 MB total.
        Maximum 10 files and 20 URLs per request. Files are read by extension:
        PDF, DOCX, TXT, CSV (one entry per row) and JSON; any other extension is
        read as plain text. Knowledge bases created with the API are not listed
        on the dashboard's Knowledge Base page, but can be attached to agents.
      operationId: createKnowledgeBase
      parameters:
        - name: X-API-KEY
          in: header
          description: (Required) Your Ringg AI API key.
          required: true
          schema:
            type: string
            example: rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - kb_name
              properties:
                kb_name:
                  type: string
                  description: (Required) Name of the knowledge base
                  example: Product Documentation
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: >-
                    (Optional) Files to upload (max 10 files, 2 MB each, 5 MB
                    total). PDF, DOCX, TXT, CSV and JSON are parsed; other files
                    are read as plain text.
                urls:
                  type: string
                  description: (Optional) JSON string array of URLs to index (max 20 URLs)
                  example: '["https://example.com/docs", "https://example.com/faq"]'
                faqs:
                  type: string
                  description: (Optional) JSON string array of FAQ objects
                  example: >-
                    [{"question": "What is your return policy?", "answer":
                    "30-day money back guarantee"}]
      responses:
        '200':
          description: Knowledge base created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Knowledge Base creation initiated
                  kb_id:
                    type: string
                    example: 550e8400-e29b-41d4-a716-446655440000
                  processing_status:
                    type: string
                    example: pending
                  files_queued:
                    type: integer
                    example: 3
        '400':
          description: Bad Request - Invalid parameters or file size exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid credentials
        '429':
          description: Rate limit exceeded - Maximum 10 requests per hour.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.