---
title: "Suspend, ban or restore an account (moderator only)"
method: PUT
path: "/users/{userId}/moderation"
tags: ["Moderation"]
---

# Suspend, ban or restore an account (moderator only)

`PUT /users/{userId}/moderation`

## Request

- Base URL: `https://whatareyoudo.ing/api/v1`
- URL: `https://whatareyoudo.ing/api/v1/users/{userId}/moderation`
- Auth: HTTP bearer

Recorded in the account's moderation history. Suspending or banning ends the account's current sessions; restoring also dismisses the open reports against it.

## Path parameters

- `userId` string, uuid, required

## Request body

- SetModerationStatusRequest
  - `status` 'active' | 'suspended' | 'banned', required
  - `reason` string, nullable

## Response `200`

OK

- object
  - `data` object, required
    - `userId` string, uuid, required
    - `status` 'active' | 'suspended' | 'banned', required
    - `reason` string, nullable, required
    - `actionId` string, uuid, required
    - `updatedAt` string, required
  - `meta` object, required
    - `requestId` string, required

## Other responses

- `403`: Not a moderator
- `404`: No such account, or it was deleted
- `422`: A moderator's own account

## Changes

- **2026-10-20** `5babd76752f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/whatareyoudo/apis/whatcha-api/changes/users/:userId/moderation/put.md)

---

[API](https://skmtc.dev/whatareyoudo/apis/whatcha-api.md) · [All operations](https://skmtc.dev/whatareyoudo/apis/whatcha-api/llms.txt) · [OpenAPI document](https://skmtc.dev/whatareyoudo/apis/whatcha-api/revisions/48dd8a54abea?raw)
