---
title: "Block User"
method: POST
path: "/api/auth/admin/block"
---

# Block User

`POST /api/auth/admin/block`

## Request

- Base URL: `https://api.openpaper.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openpaper.ai/api/auth/admin/block`
- Auth: API key in header `Authorization`

Block or unblock a user. Admin only.

## Request body

- BlockUserRequest: Request model for blocking/unblocking a user.
  - `user_id` string, required
  - `blocked` boolean, required

## Response `200`

Successful Response

- AuthResponse: Response model for auth routes.
  - `success` boolean, required
  - `message` string, required
  - `user` CurrentUser
    - `id` string, uuid, required
    - `email` string, email, required
    - `name` string, nullable
    - `is_admin` boolean
    - `picture` string, nullable
    - `is_email_verified` boolean
    - `is_active` boolean
    - `is_blocked` boolean
  - `newly_created` boolean
  - `needs_name` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/openpaper/apis/open-paper.md) - [All operations](https://skmtc.dev/openpaper/apis/open-paper/llms.txt) - [OpenAPI document](https://skmtc.dev/openpaper/apis/open-paper/revisions/c2ad03216101?raw)
