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

# Create knowledge base topic



## OpenAPI

````yaml POST /v1/agents/{agentId}/branches/{branchId}/knowledge-base/topics
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/{branchId}/knowledge-base/topics:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: branchId
        in: path
        required: true
        schema:
          type: string
    post:
      tags:
        - Knowledge Base
      summary: Create knowledge base topic
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKnowledgeBaseTopicBody'
      responses:
        '201':
          description: Created topic
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKnowledgeBaseTopicPublicResponse'
components:
  schemas:
    CreateKnowledgeBaseTopicBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        content:
          type: string
          minLength: 1
        actions:
          type: string
        exampleQueries:
          type: object
          properties:
            queries:
              type: array
              items:
                type: string
              maxItems: 100
          required:
            - queries
          additionalProperties: false
        isActive:
          type: boolean
      required:
        - name
        - content
      additionalProperties: false
      title: CreateKnowledgeBaseTopicBody
    CreateKnowledgeBaseTopicPublicResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        content:
          type: string
        actions:
          type: string
        exampleQueries:
          type: object
          properties:
            queries:
              type: array
              items:
                type: string
          required:
            - queries
          additionalProperties: false
        isActive:
          type: boolean
      required:
        - id
        - name
        - content
        - actions
        - exampleQueries
        - isActive
      additionalProperties: false
      title: CreateKnowledgeBaseTopicPublicResponse
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````