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

# Delete Topic

> Soft-deletes a topic. By default its prompts are kept: they stay active, keep their history, remain grouped under the deleted topic in the app, and can be re-categorized later. Pass `delete_prompts=true` to also soft-delete every active prompt in the topic (they stop generating responses). Reversible: creating a topic with the same name restores it and its prompt grouping.



## OpenAPI

````yaml /api-reference/openapi.json delete /api/v1/topics/{topic_id}
openapi: 3.1.0
info:
  title: AthenaHQ API
  description: >-
    AthenaHQ API provides programmatic access to manage your websites and
    prompts for AI-powered content optimization.
  version: 1.0.0
  contact:
    email: support@athenahq.ai
servers:
  - url: https://api.athenahq.ai
    description: Production server
security:
  - apiKey: []
tags:
  - name: Basics
    description: Core API operations for managing websites and prompts
  - name: Metrics
    description: Metrics and analytics endpoints for tracking AI visibility
  - name: Billing
    description: Billing and credits endpoints for managing usage
  - name: Team Management
    description: Endpoints for managing team members and invitations
  - name: Groups
    description: Endpoints for managing groups of websites
  - name: Content
    description: >-
      Endpoints for accessing Content Hub data — tabs, tracked URLs, and per-URL
      prompt breakdowns.
  - name: Pitch Workspace
    description: >-
      Endpoints for accessing pitch workspace reports — org-scoped pitch runs
      with competitors, prompts, attributes, and aggregate metrics.
paths:
  /api/v1/topics/{topic_id}:
    delete:
      tags:
        - Basics
      summary: Delete Topic
      description: >-
        Soft-deletes a topic. By default its prompts are kept: they stay active,
        keep their history, remain grouped under the deleted topic in the app,
        and can be re-categorized later. Pass `delete_prompts=true` to also
        soft-delete every active prompt in the topic (they stop generating
        responses). Reversible: creating a topic with the same name restores it
        and its prompt grouping.
      operationId: deleteTopic
      parameters:
        - name: topic_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The topic to delete.
        - name: website_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
          description: Website that owns the topic.
        - name: delete_prompts
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
          description: >-
            When "true", also soft-deletes every active prompt in the topic.
            Defaults to "false" (prompts are kept).
      responses:
        '200':
          description: Topic deleted
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - name
                  - deleted_prompt_count
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  name:
                    type: string
                    description: Name of the deleted topic.
                  deleted_prompt_count:
                    type: integer
                    description: >-
                      Number of prompts soft-deleted alongside the topic (0
                      unless delete_prompts=true).
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - You don't have access to this website
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found - Topic not found, deleted, or on another website
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_found:
                  value:
                    error: Topic not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    Error:
      type: object
      description: Error response object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can create one
        [here](https://app.athenahq.ai/organization?tab=api).

````