---
title: "List data deletions"
method: GET
path: "/v1/data_deletions"
tags: ["Data deletions"]
---

# List data deletions

`GET /v1/data_deletions`

## Request

- Base URL: `https://api.dexto.ai`
- URL: `https://api.dexto.ai/v1/data_deletions`
- Auth: HTTP bearer

List this key's Cloud project's data deletions, newest first.

## Query parameters

- `limit` integer
- `after` string

## Response `200`

Successful response.

- object
  - `data` object[], required
    - `completed_at` string, date-time, nullable, required: When it completed or failed; null while it is queued or running.
    - `created_at` string, date-time, required
    - `created_by` union, required: The API key that asked for it, or the person through an OAuth token.
      - object
        - `api_key_id` string, uuid, required: The API key that asked for it.
        - `type` 'api_key', required
      - object
        - `type` 'user', required
        - `user_id` string, required: The person who created it through an OAuth token, or whose key was since deleted.
    - `deleted` object, required: What it deleted so far.
      - `automations` integer, required
      - `sessions` integer, required
    - `error` object, nullable, required: Why the deletion failed; null unless status is failed. What it deleted stays deleted, an agent it was deleting stays archived, and requesting the same deletion again resumes it.
      - `code` 'deletion_failed', required
      - `message` string, required
    - `id` string, uuid, required
    - `object` 'data_deletion', required
    - `scope` object, required
      - `agent_id` string, uuid, nullable, required: The agent, or null for a user deletion across the project.
      - `type` 'agent' | 'user', required: user: one end user's sessions and the automations that write to them. agent: everything of one agent.
    - `status` 'queued' | 'running' | 'completed' | 'failed', required
  - `has_more` boolean, required
  - `next_after` string, nullable, required: An opaque cursor: pass it as `after` to read the next page. Null when there are no more.
  - `object` 'list', required

## Other responses

- `400`: Invalid JSON or request fields.
- `401`: Missing or invalid API key.
- `402`: The account has insufficient credits.
- `403`: The account cannot perform this operation.
- `404`: The requested resource was not found.
- `409`: The request conflicts with existing resource state.
- `429`: The account exceeded this operation's request rate.
- `500`: Unexpected Dexto failure.
- `502`: The upstream model provider failed.
- `503`: A required Dexto service is temporarily unavailable.

---

[API](https://skmtc.dev/dexto/apis/dexto-api.md) - [All operations](https://skmtc.dev/dexto/apis/dexto-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dexto/apis/dexto-api/revisions/47eb880cffa5?raw)
