---
title: "Delete tenant data"
method: DELETE
path: "/v1/tenants/{tenant_id}/data"
tags: ["Tenant Data"]
---

# Delete tenant data

`DELETE /v1/tenants/{tenant_id}/data`

Permanently deletes Hub-owned data for the specified tenant_id. This endpoint is intended for
tenant/account offboarding after the tenant has been deprovisioned and upstream writes for that
tenant have stopped. This includes feedback records, derived embeddings, taxonomy data, and
webhooks for the tenant. This operation is synchronous and idempotent; repeated calls return zero
counts after the tenant data has already been deleted.

The purge is serialized against tenant-owned writes: while it runs, Hub-owned writes for the same
tenant_id are rejected with HTTP 409 (code `tenant_write_conflict`); writes for other tenants are
unaffected. If tenant-owned writes are in flight when the purge starts, the purge waits up to a
configured lock timeout for them to drain and then returns a retryable 409.

No webhook events are published as part of this purge operation, and writes rejected during the
purge publish no events. Webhook deliveries already in flight when the purge commits complete
normally, and previously enqueued delivery jobs no-op after the purge (their queued payloads are
removed by the job queue's retention pruning rather than by this endpoint).

## Path parameters

- `tenant_id` string, required

## Response `200`

Tenant data deleted

- TenantDataDeleteOutputBody
  - `tenant_id` string, required — Tenant ID whose data was deleted
  - `deleted_feedback_records` integer, required — Number of feedback records deleted
  - `deleted_embeddings` integer, required — Number of embedding rows deleted
  - `deleted_webhooks` integer, required — Number of webhooks deleted
  - `deleted_taxonomy_runs` integer, required — Number of taxonomy runs deleted
  - `deleted_taxonomy_clusters` integer, required — Number of taxonomy clusters deleted
  - `deleted_taxonomy_cluster_memberships` integer, required — Number of taxonomy cluster memberships deleted
  - `deleted_taxonomy_nodes` integer, required — Number of taxonomy nodes deleted
  - `deleted_taxonomy_active_runs` integer, required — Number of taxonomy active-run rows deleted
  - `deleted_taxonomy_node_events` integer, required — Number of taxonomy node events deleted
  - `message` string, required — Human-readable status message

## Other responses

- `400` — Bad Request (e.g. missing or invalid tenant_id)
- `409` — Conflict – tenant-owned writes were in flight and did not drain within the purge lock timeout (code `tenant_write_conflict`). No data was deleted; retry the purge.
- `default` — Error

---

[API](https://skmtc.net/formbricks/apis/formbricks-hub-api.md) · [All operations](https://skmtc.net/formbricks/apis/formbricks-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/formbricks/formbricks-hub-api/revisions/8d06d9728138/schema)
