---
title: "Delete accounts"
method: DELETE
path: "/admin/accounts/"
tags: ["Admin"]
---

# Delete accounts

`DELETE /admin/accounts/`

## Request body

- AdminAccountsDelete
  - `target` AdminAccountsDeleteTarget, required
    - `user_ids` string[], nullable
    - `user_emails` string[], nullable
    - `organization_ids` string[], nullable
    - `workspace_ids` string[], nullable
    - `project_ids` string[], nullable
  - `dry_run` boolean, nullable
  - `reason` string, nullable
  - `confirm` string, nullable

## Response `200`

Successful Response

- AdminDeleteResponse
  - `dry_run` boolean
  - `deleted` AdminDeletedEntities
    - `users` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `user_identities` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `organizations` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `workspaces` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `projects` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `organization_memberships` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `workspace_memberships` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `project_memberships` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `api_keys` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
  - `skipped` AdminDeletedEntities
    - `users` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `user_identities` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `organizations` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `workspaces` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `projects` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `organization_memberships` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `workspace_memberships` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `project_memberships` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
    - `api_keys` AdminDeletedEntity[], nullable
      - `id` string, required
      - `ref` string, nullable
  - `errors` AdminStructuredError[], nullable
    - `code` string, required
    - `message` string, required
    - `details` object, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-05-08** `5e6f53ce5d08` — 3 info
  - api operation id `admin_delete_accounts` removed and replaced with `delete_accounts_admin_accounts__delete`
  - added `#/components/schemas/AdminDeletedEntities` to the `skipped` response property `anyOf` list for the response status `200`
  - removed `#/components/schemas/AdminDeletedEntitiesDTO` from the `skipped` response property `anyOf` list for the response status `200`
- **2026-04-16** `8b06b786c977` — 1 info
  - endpoint added
- **2025-06-27** `e3e84db47198` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/admin/accounts/delete.md)

---

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