7 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/restrictions/communities/{communityId}/members/{memberId}/restrictions | Get all restrictions (history) for a community member (moderator/admin) |
POST | /api/restrictions/communities/{communityId}/members/{memberId}/restrictions | Apply a new restriction to a community member (moderator/admin) |
DELETE | /api/restrictions/communities/{communityId}/members/{memberId}/restrictions/{restrictionId} | Revoke an active restriction (moderator/admin) |
GET | /api/restrictions/communities/{communityId}/members/{memberId}/restrictions/active | Get only active restrictions for a community member (moderator/admin) |
GET | /api/restrictions/communities/{communityId}/restrictions | List all restrictions for a community (moderator/admin) |
GET | /api/restrictions/communities/{communityId}/restrictions/expiring-soon | Get restrictions expiring soon (moderator/admin) |
GET | /api/restrictions/my/restrictions | Get current user's active restrictions in a community |
GET /api/restrictions/communities/{communityId}/members/{memberId}/restrictionsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
memberId | path | yes | string (uuid) | — |
page | query | no | integer | — |
limit | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of restrictions | — |
403 | Permission denied | — |
POST /api/restrictions/communities/{communityId}/members/{memberId}/restrictionsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
memberId | path | yes | string (uuid) | — |
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
type | enum: MUTE, RESTRICT, SUSPEND, FEATURE_BLOCK | yes | — |
reason | string | yes | — |
duration | integer | no | — |
blockedFeatures | string[] | no | — |
Responses
| Status | Description | Body |
|---|---|---|
201 | Restriction applied successfully | — |
403 | Permission denied | — |
DELETE /api/restrictions/communities/{communityId}/members/{memberId}/restrictions/{restrictionId}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
memberId | path | yes | string (uuid) | — |
restrictionId | path | yes | string (uuid) | — |
Request body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
revokeReason | string | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Restriction revoked successfully | — |
403 | Permission denied | — |
GET /api/restrictions/communities/{communityId}/members/{memberId}/restrictions/activeAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
memberId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of active restrictions | — |
403 | Permission denied | — |
GET /api/restrictions/communities/{communityId}/restrictionsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
page | query | no | integer | — |
limit | query | no | integer | — |
type | query | no | string | — |
isActive | query | no | boolean | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Paginated list of restrictions | — |
403 | Permission denied | — |
GET /api/restrictions/communities/{communityId}/restrictions/expiring-soonAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
withinHours | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of expiring restrictions | — |
403 | Permission denied | — |
GET /api/restrictions/my/restrictionsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | query | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | User's restrictions | — |
401 | Authentication required | — |