---
title: "Ban/Unban a user based on his id and the action provided."
method: POST
path: "/api/admin/users/:action/:id"
tags: ["admin"]
---

# Ban/Unban a user based on his id and the action provided.

`POST /api/admin/users/:action/:id`

Ban/unban a user based on his user id. This operation can only be done by admins

## Query parameters

- `action` string, required
- `id` string, required

## Response `200`

OK

- ApiChallengeStatusResp
  - `name` string
  - `status` string
  - `updated_at` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

## Changes

- **2026-07-17** `7d8933ea23d5` — 2 info
  - api tag `admin` added
  - api tag `status` removed
- **2021-03-02** `00c7dd549484` — 2 info
  - api tag `status` added
  - api tag `admin` removed

[Change history](https://skmtc.dev/sdslabs/apis/beast-api/changes/api/admin/users/:action/:id/post.md)

---

[API](https://skmtc.dev/sdslabs/apis/beast-api.md) · [All operations](https://skmtc.dev/sdslabs/apis/beast-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sdslabs/beast-api/revisions/7d8933ea23d5/schema)
