# Delete accounts

Source: https://agenta.ai/docs/reference/api/delete-accounts-admin-accounts-delete

`DELETE /admin/accounts/`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Delete accounts

## Request body schema

Content type: `application/json` (required)

- `target` (object, required)
  - `user_ids` (array of string, nullable)
  - `user_emails` (array of string, nullable)
  - `organization_ids` (array of string, nullable)
  - `workspace_ids` (array of string, nullable)
  - `project_ids` (array of string, nullable)
- `dry_run` (boolean, nullable) Default: `true`.
- `reason` (string, nullable)
- `confirm` (string, nullable)

## Response schemas

### 200: Successful Response

- `dry_run` (boolean) Default: `false`.
- `deleted` (object) Default: `{}`.
  - `users` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `user_identities` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `organizations` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `workspaces` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `projects` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `organization_memberships` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `workspace_memberships` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `project_memberships` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `api_keys` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
- `skipped` (object, nullable)
  - `users` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `user_identities` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `organizations` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `workspaces` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `projects` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `organization_memberships` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `workspace_memberships` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `project_memberships` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
  - `api_keys` (array of object, nullable)
    - `id` (string, required)
    - `ref` (string, nullable)
- `errors` (array of object, nullable)
  - `code` (string, required)
  - `message` (string, required)
  - `details` (object, nullable)

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
