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

# Merge one topic into another

> Re-tags every source and chunk from `fromSlug` to `intoSlug`, then deletes `fromSlug`. Both must exist, differ and share a scope.



## OpenAPI

````yaml /openapi.json post /v1/knowledge/topics/merge
openapi: 3.0.0
info:
  title: wondeya Developer API
  description: >-
    The public REST API for building on wondeya: agents, projects, pages,
    knowledge, assets, brand, theme, usage, retrieval and chat, authenticated by
    a workspace API key (`Authorization: Bearer wdy_live_…`).
  version: 0.1.0
  contact:
    name: wondeya
    url: https://wondeya.com
    email: team@wondeya.com
  license:
    name: Proprietary
    url: https://wondeya.com/terms
servers:
  - url: https://api.wondeya.com
    description: Production
  - url: http://localhost:8080
    description: Development
security: []
tags:
  - name: Identity
  - name: Agents
  - name: Projects
  - name: Pages
  - name: Knowledge
  - name: Assets
  - name: Brand
  - name: Usage
  - name: Chat
paths:
  /v1/knowledge/topics/merge:
    post:
      tags:
        - Knowledge
      summary: Merge one topic into another
      description: >-
        Re-tags every source and chunk from `fromSlug` to `intoSlug`, then
        deletes `fromSlug`. Both must exist, differ and share a scope.
      operationId: PublicKnowledgeController_mergeTopics_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MergeKnowledgeTopicsDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicKnowledgeTopicDto'
        '404':
          description: No such topic in this workspace
      security:
        - api-key: []
components:
  schemas:
    MergeKnowledgeTopicsDto:
      type: object
      properties:
        fromSlug:
          type: string
          description: The topic absorbed and then deleted.
        intoSlug:
          type: string
          description: The surviving topic its tags move to.
        agentId:
          type: object
          nullable: true
      required:
        - fromSlug
        - intoSlug
    PublicKnowledgeTopicDto:
      type: object
      properties:
        agentId:
          type: object
          nullable: true
        slug:
          type: string
          description: The stable machine key; identifies the topic.
        title:
          type: string
        description:
          type: string
        origin:
          type: string
          description: '`auto` (enricher) or `manual` (edited).'
        sourceCount:
          type: number
        chunkCount:
          type: number
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - agentId
        - slug
        - title
        - description
        - origin
        - sourceCount
        - chunkCount
        - createdAt
        - updatedAt
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: opaque
      type: http
      description: >-
        A workspace API key: wdy_live_… / wdy_test_…. Created at POST
        /workspaces/{tenantId}/keys and shown exactly once.

````