18 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/communities/{communityId}/groups | List all groups in a community |
POST | /api/communities/{communityId}/groups | Create a new group (Moderator+ only) |
DELETE | /api/communities/{communityId}/groups/{groupId} | Delete a group (Moderator+ only) |
GET | /api/communities/{communityId}/groups/{groupId} | Get a single group by ID |
PUT | /api/communities/{communityId}/groups/{groupId} | Update a group (Moderator+ only) |
PATCH | /api/communities/{communityId}/groups/{groupId}/hide | Hide a group (Moderator+ only) |
POST | /api/communities/{communityId}/groups/{groupId}/join | Join a group |
GET | /api/communities/{communityId}/groups/{groupId}/join-requests | Get all join requests for a group (Admin/Moderator only) |
POST | /api/communities/{communityId}/groups/{groupId}/join-requests | Request to join a private group |
DELETE | /api/communities/{communityId}/groups/{groupId}/join-requests/{requestId} | Cancel a join request (by the requester) |
PATCH | /api/communities/{communityId}/groups/{groupId}/join-requests/{requestId}/approve | Approve a join request (Admin/Moderator only) |
PATCH | /api/communities/{communityId}/groups/{groupId}/join-requests/{requestId}/reject | Reject a join request (Admin/Moderator only) |
GET | /api/communities/{communityId}/groups/{groupId}/join-requests/my-status | Get current user's join request status for a group |
POST | /api/communities/{communityId}/groups/{groupId}/leave | Leave a group |
GET | /api/communities/{communityId}/groups/{groupId}/members | Get all members of a group |
GET | /api/communities/{communityId}/groups/{groupId}/membership-status | Check membership status for current user in a group |
PATCH | /api/communities/{communityId}/groups/{groupId}/unhide | Unhide a group (Moderator+ only) |
GET | /api/communities/{communityId}/groups/join-requests | Community-wide aggregate of group join requests (Moderator+ only) |
GET /api/communities/{communityId}/groupsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | Community ID |
page | query | no | integer | Page number |
limit | query | no | integer | Items per page |
type | query | no | enum: PRIVATE, PUBLIC | Filter by group type |
search | query | no | string | Search in group names |
hasSpace | query | no | boolean | Filter groups with available space |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of groups with pagination | object |
400 | Invalid request parameters | — |
401 | Authentication required | — |
404 | Community not found | — |
POST /api/communities/{communityId}/groupsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
Request body (required) — multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
nameArabic | string | yes | Group name in Arabic |
name | string | yes | Group name in English |
descriptionArabic | string | yes | Group description in Arabic |
description | string | yes | Group description in English |
type | enum: PRIVATE, PUBLIC | yes | Group privacy type |
memberCount | integer | yes | Member limit (-1 for unlimited, positive number for limit) |
canChat | boolean | yes | Enable chat functionality |
email | string (email) | no | Optional group email |
website | string (uri) | no | Optional group website |
icon | string (binary) | yes | Group icon (required, max 2MB, image types only) |
coverImage | string (binary) | no | Group cover image (optional, max 5MB, image types only) |
Responses
| Status | Description | Body |
|---|---|---|
201 | Group created successfully | object |
400 | Invalid request or validation error | — |
401 | Authentication required | — |
403 | Insufficient permissions (Moderator+ required) | — |
404 | Community not found | — |
DELETE /api/communities/{communityId}/groups/{groupId}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Group deleted successfully | — |
401 | Authentication required | — |
403 | Insufficient permissions (Moderator+ required) | — |
404 | Group not found | — |
GET /api/communities/{communityId}/groups/{groupId}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Group details | object |
401 | Authentication required | — |
404 | Group not found | — |
PUT /api/communities/{communityId}/groups/{groupId}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Request body (required) — multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
nameArabic | string | no | — |
name | string | no | — |
descriptionArabic | string | no | — |
description | string | no | — |
type | enum: PRIVATE, PUBLIC | no | — |
memberCount | integer | no | — |
canChat | boolean | no | — |
email | string (email) | no | — |
website | string (uri) | no | — |
icon | string (binary) | no | New group icon (optional, max 2MB) |
coverImage | string (binary) | no | New group cover image (optional, max 5MB) |
Responses
| Status | Description | Body |
|---|---|---|
200 | Group updated successfully | — |
400 | Invalid request or validation error | — |
401 | Authentication required | — |
403 | Insufficient permissions | — |
404 | Group not found | — |
PATCH /api/communities/{communityId}/groups/{groupId}/hideAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Group hidden successfully | object |
400 | Group is already hidden | — |
401 | Authentication required | — |
403 | Insufficient permissions (Moderator+ required) | — |
404 | Group not found | — |
POST /api/communities/{communityId}/groups/{groupId}/joinAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successfully joined group | — |
403 | User is restricted from joining groups | — |
GET /api/communities/{communityId}/groups/{groupId}/join-requestsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
page | query | no | integer | — |
limit | query | no | integer | — |
status | query | no | enum: PENDING, APPROVED, REJECTED, CANCELLED | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Paginated list of join requests | — |
403 | Permission denied | — |
POST /api/communities/{communityId}/groups/{groupId}/join-requestsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Request body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
message | string | no | Optional message to group admins |
Responses
| Status | Description | Body |
|---|---|---|
201 | Join request submitted successfully | — |
403 | User is restricted from joining groups | — |
DELETE /api/communities/{communityId}/groups/{groupId}/join-requests/{requestId}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
requestId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Join request cancelled successfully | — |
403 | Not authorized to cancel this request | — |
404 | Join request not found | — |
PATCH /api/communities/{communityId}/groups/{groupId}/join-requests/{requestId}/approveAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
requestId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Join request approved and user added to group | — |
403 | Permission denied | — |
404 | Join request not found | — |
PATCH /api/communities/{communityId}/groups/{groupId}/join-requests/{requestId}/rejectAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
requestId | path | yes | string (uuid) | — |
Request body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | no | Optional rejection reason |
Responses
| Status | Description | Body |
|---|---|---|
200 | Join request rejected | — |
403 | Permission denied | — |
404 | Join request not found | — |
GET /api/communities/{communityId}/groups/{groupId}/join-requests/my-statusAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | User's join request status | — |
404 | No join request found | — |
POST /api/communities/{communityId}/groups/{groupId}/leaveAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successfully left group | — |
400 | Cannot leave (e.g., sole admin) | — |
403 | User is restricted from leaving groups | — |
GET /api/communities/{communityId}/groups/{groupId}/membersAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
page | query | no | integer | — |
limit | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Paginated list of group members | — |
403 | Not authorized to view members (private group) | — |
GET /api/communities/{communityId}/groups/{groupId}/membership-statusAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Membership status | object |
PATCH /api/communities/{communityId}/groups/{groupId}/unhideAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
groupId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Group unhidden successfully | object |
400 | Group is already visible | — |
401 | Authentication required | — |
403 | Insufficient permissions (Moderator+ required) | — |
404 | Group not found | — |
GET /api/communities/{communityId}/groups/join-requestsReturns join requests across ALL groups in the community in a single
paginated response — replaces the per-group fan-out the badge / modal
used to do. Call with ?status=PENDING&limit=1 to read just the
pending count from pagination.total.
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
status | query | no | enum: PENDING, APPROVED, REJECTED, CANCELLED | — |
page | query | no | integer | — |
limit | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Aggregated list of join requests with embedded group + user info | — |
403 | Insufficient permissions (Moderator+ required) | — |