---
title: "delete data"
method: POST
path: "/v1/tenants/{tenant_id}/data/delete"
tags: ["Data"]
---

# delete data

`POST /v1/tenants/{tenant_id}/data/delete`

## Path parameters

- `tenant_id` string, required

## Request body

- DataDeleteBody — DataDeleteRequest defines the structure of a request to delete data. It includes the tenant_id and filters for selecting tuples and attributes to be deleted.
  - `tuple_filter` TupleFilter — TupleFilter is used to filter tuples based on the entity, relation and the subject.
    - `entity` EntityFilter — EntityFilter is used to filter entities based on the type and ids.
      - `type` string
      - `ids` string[]
    - `relation` string
    - `subject` SubjectFilter — SubjectFilter is used to filter subjects based on the type, ids and relation.
      - `type` string
      - `ids` string[]
      - `relation` string
  - `attribute_filter` AttributeFilter — AttributeFilter is used to filter attributes based on the entity and attribute names.
    - `entity` EntityFilter — EntityFilter is used to filter entities based on the type and ids.
      - `type` string
      - `ids` string[]
    - `attributes` string[]

## Response `200`

A successful response.

- DataDeleteResponse — DataDeleteResponse defines the structure of the response to a data delete request. It includes a snap_token representing the state of the database after the deletion.
  - `snap_token` string — The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)

## Other responses

- `default` — An unexpected error response.

## Changes

- **2025-12-28** `f37e45046dd2` — 1 breaking
  - the `details/items/additionalProperties/` response's property type/format changed from `object`/`` to ``/`` for status `default`
- **2024-08-23** `f3b10e35081b` — 1 breaking, 2 info
  - added required request body
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `default`
- **2024-08-22** `282fb7ba2640` — 3 breaking
  - removed the request body
  - removed the media type `application/json` for the response with the status `200`
  - removed the media type `application/json` for the response with the status `default`
- **2024-03-19** `0bc305aa169f` — 1 breaking
  - the `details/items/additionalProperties/` response's property type/format changed from ``/`` to `object`/`` for status `default`

[Change history](https://skmtc.dev/permify/apis/permify-api/changes/v1/tenants/:tenant_id/data/delete/post.md)

---

[API](https://skmtc.dev/permify/apis/permify-api.md) · [All operations](https://skmtc.dev/permify/apis/permify-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/permify/permify-api/revisions/73b7d5b3742e/schema)
