# Delete/Recreate Table

`POST /api/v1/dl/delete_table`

Permanently deletes a Tableflow table and all of its associated metadata from the WarpStream control plane.

{% hint style="danger" %}
**This operation is irreversible.** The table's metadata in the WarpStream control plane will be permanently removed. Data files already synced to your object storage bucket under `warpstream/_tableflow` are **not** deleted, you must clean those up manually using your cloud provider's UI or CLI.
{% endhint %}

{% hint style="info" %}
This endpoint requires admin-level permissions. Read-only API keys cannot delete tables.
{% endhint %}

### Request

| Field                | Type   | Required | Description                              |
| -------------------- | ------ | -------- | ---------------------------------------- |
| `virtual_cluster_id` | string | Yes      | The ID of the Tableflow virtual cluster. |
| `table_uuid`         | string | Yes      | The UUID of the table to delete.         |

#### CURL Example

```bash
curl [https://api.warpstream.com/api/v1/dl/delete_table](https://api.warpstream.com/api/v1/dl/delete_table) \
  -H 'warpstream-api-key: XXXXXXXXXX' \
  -H 'Content-Type: application/json' \
  -d '{
    "virtual_cluster_id": "vci_XXXXXXXX_XXXX_XXXX_XXXX_XXXXXXXXXXXX", 
    "table_uuid": "550e8400-e29b-41d4-a716-446655440000"
  }'
```

### Response

```json
{}
```

### Table Deletion and Recreation

Removing a table from the YAML configuration does **not** delete it. It only stops ingestion, the table and its metadata remain in the WarpStream control plane. Adding the table back to the configuration will resume ingestion on the same existing table.

To permanently delete a table, use one of the following methods:

* The **Delete** button in the Tableflow UI in the WarpStream Console.
* The Delete Table API endpoint.

Deleting a table removes all metadata from the WarpStream control plane but does **not** delete data files already synced to your object storage bucket. To fully clean up, delete the table's directory from within the `warpstream/_tableflow` path in your bucket using your cloud provider's UI or CLI.

#### Recreating a Table

To recreate a table from scratch (for example, to reset ingestion after a schema change or data issue):

1. Delete the table using the API or UI.
2. Keep the source topic in your YAML configuration (or add it back if you removed it).
3. On the next discovery cycle, Tableflow will automatically create a new table with a fresh UUID and begin ingesting from scratch.

The new table will have no historical data, it is a brand-new table from the control plane's perspective.
