> ## Documentation Index
> Fetch the complete documentation index at: https://dune-pro-1110-add-delete-endpoints-python-js-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Table (beta)

<Warning>
  This endpoint is currently in beta, and may change without warning.
</Warning>

To be able to delete a table, it must have been created with the [/create endpoint](./create).

<Note>
  * You must be an admin to delete the table.
  * You can also delete a table through `user settings (dune.com) -> data -> delete`.
  * Deleting a table does not incur credits.
</Note>

<RequestExample>
  ```bash curl
  curl --request DELETE \
    --url https://api.dune.com/api/v1/table/my_user/interest_rates \
    --header 'X-DUNE-API-KEY: <x-dune-api-key>'
  ```

  ```python Python SDK
  import dotenv, os
  from dune_client.client import DuneClient
   
  dotenv_path = os.path.join(os.path.dirname(__file__), '.', '.env')
  dotenv.load_dotenv(".env")
  dune = DuneClient.from_env()

  table = dune.delete_table(
          namespace="my_user",
          table_name="interest_rates"
  )
  ```

  ```python Python
  import requests

  url = "https://api.dune.com/api/v1/table/my_user/interest_rates"

  headers = {
      "X-DUNE-API-KEY": "<x-dune-api-key>"
  }

  response = requests.request("DELETE", url, headers=headers)
  ```

  ```javascript Javascript
  const url = "https://api.dune.com/api/v1/table/my_user/interest_rates";

  const headers = {
      "X-DUNE-API-KEY": "<x-dune-api-key>"
  };

  fetch(url, {
      method: 'DELETE',
      headers: headers
  })
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  ```
</RequestExample>
