---
title: "Get a data deletion"
method: GET
path: "/v1/data_deletions/{data_deletion_id}"
tags: ["Data deletions"]
---

# Get a data deletion

`GET /v1/data_deletions/{data_deletion_id}`

## Request

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

Get a data deletion: its status and what it deleted so far.

## Path parameters

- `data_deletion_id` string, required

## Response `200`

Successful response.

- object
  - `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

## 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)
