---
title: "POST Ban a user and their associated workspaces"
description: "Bans a user by email, updates edge config, deletes workspaces, and removes the user."
last_updated: "2026-10-12T07:00:55.760836+00:00"
canonical_url: "https://www.doc0.dev/docs/934e554a-e6a1-476f-bb2f-23e62d86c3fd/api/admin/banadminuser"
---

<APIEndpoint
  method={"POST"}
  path={"/api/admin/ban"}
  summary={"Ban a user and their associated workspaces"}
  description={"Bans a user by email, updates edge config, deletes workspaces, and removes the user."}
  deprecated={false}
  baseUrl={""}
/>

## Request Body

User email and domain block option

<APIRequestBody
  contentType={"application/json"}
  required={true}
  schema={{"type":"object"}}
/>

## Responses

<APIResponse
  statusCode={"200"}
  description={"User and associated workspaces successfully banned and queued for deletion"}
  contentType={"application/json"}
/>

## Try It

<APIPlayground
  method={"POST"}
  path={"/api/admin/ban"}
  parameters={[]}
  requestBody={{"contentType":"application/json","required":true,"description":"User email and domain block option","schema":{"type":"object"}}}
  baseUrl={""}
/>


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/934e554a-e6a1-476f-bb2f-23e62d86c3fd/llms.txt) for all pages in this wiki.
