> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-fix-issues-on-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove Topic

> Remove a topic and all its endpoints

The topic and all its endpoints are removed. In flight messages in the topic are not removed but you will not be able to send messages to the topic anymore.

## Request

<ParamField path="topicName" type="string" required>
  The name of the topic to remove.
</ParamField>

## Response

This endpoint returns 200 if the topic is removed successfully.

<RequestExample>
  ```sh curl
  curl -XPOST https://qstash.upstash.io/v2/topics/my-topic \
    -H "Authorization: Bearer <token>"
  ```

  ```js Node
  const response = await fetch('https://qstash.upstash.io/v2/topics/my-topic', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer <token>'
    }
  });
  ```

  ```python Python
  import requests

  headers = {
      'Authorization': 'Bearer <token>',
  }

  response = requests.post(
    'https://qstash.upstash.io/v2/topics/my-topic', 
    headers=headers
  )
  ```

  ```go Go 
  req, err := http.NewRequest("POST", "https://qstash.upstash.io/v2/topics/my-topic", nil)
  if err != nil {
    log.Fatal(err)
  }
  req.Header.Set("Authorization", "Bearer <token>")
  resp, err := http.DefaultClient.Do(req)
  if err != nil {
    log.Fatal(err)
  }
  defer resp.Body.Close()
  ```
</RequestExample>
