---
title: "POST Ban a user and their associated workspaces"
description: "Blocks the user email and optionally domain terms, deletes associated workspaces, and deletes the user."
last_updated: "2026-10-05T05:08:23.88209+00:00"
canonical_url: "https://www.doc0.dev/docs/934e554a-e6a1-476f-bb2f-23e62d86c3fd/api/admin/banuserandworkspaces"
---

<APIEndpoint
  method={"POST"}
  path={"/api/admin/ban"}
  summary={"Ban a user and their associated workspaces"}
  description={"Blocks the user email and optionally domain terms, deletes associated workspaces, and deletes the user."}
  deprecated={false}
  baseUrl={""}
/>

## Request Body

Email and blocking options

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

## Responses

<APIResponse
  statusCode={"200"}
  description={"User ban initiated"}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

## Try It

<APIPlayground
  method={"POST"}
  path={"/api/admin/ban"}
  parameters={[]}
  requestBody={{"contentType":"application/json","required":true,"description":"Email and blocking options","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.
