On this page

Community management endpoints

9 endpoints.

MethodPathSummary
GET/api/communitiesGet all communities
POST/api/communitiesCreate a new community (Super Admin only)
GET/api/communities/{communityId}/external-sectionsExternal sections of the community sidebar
PUT/api/communities/{communityId}/external-sectionsReplace the external sections
DELETE/api/communities/{id}Delete community (Super Admin only)
GET/api/communities/{id}Get a single community by ID
PUT/api/communities/{id}Update community (Community Admin or Super Admin)
PATCH/api/communities/{id}/archiveArchive (hide) a community - Community Admin only
PATCH/api/communities/{id}/unarchiveUnarchive (restore) a community - Community Admin only

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
pagequerynointeger—
limitquerynointeger—
searchquerynostring—

Responses

StatusDescriptionBody
200Communities list with pagination—

Auth: Bearer JWT required.

Request body (required) — application/json

FieldTypeRequiredDescription
namestringyes—
nameArabicstringyes—
slugstringyes—
descriptionstringno—
descriptionArabicstringno—
logostringno—
typeenum: PUBLIC, PRIVATEnoCommunity visibility (preferred — single source of truth).
isPublicbooleannoDeprecated — pass type instead. Still accepted as input for back-compat; the underlying column was removed in the Community.isPublic removal plan, commit 4.

Responses

StatusDescriptionBody
201Community created successfully—
403Only Super Admins can create communities—

Sections an admin added to the sidebar that open a page on another site in a new tab (the «External Sections» App Store app). The member arrives on that site through its own sign-in; Gurb sends no token. A member gets the sections that are shown; a caller with homepage:customize or settings:manage also gets the hidden ones, and canManage is true. Each section follows the built-in section named by afterId (null = above every built-in section).

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdpathyesstringCommunity id. The caller must be an approved member.

Responses

StatusDescriptionBody
200The sections, in the order they were saved.ExternalSectionsResponse
401No valid token.—
403Not a member of this community (NOT_A_COMMUNITY_MEMBER), or the app is not on for it (FEATURE_NOT_AVAILABLE, featureKey external_sections).—

Sends the WHOLE list; sections left out are removed. A section without an id is new and gets one. At most 10 sections; names 1-20 characters; url must be an absolute http or https address with no user name or password; icon is one of the sidebar icons.

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdpathyesstring—

Request body (required) — application/json

FieldTypeRequiredDescription
itemsExternalSection[]yes—

Responses

StatusDescriptionBody
200The stored list.ExternalSectionsResponse
400INVALID_EXTERNAL_SECTIONS — the message names the field, e.g. "items[0].url: url must start with http:// or https://".—
403NOT_A_COMMUNITY_MEMBER, "Missing one of permissions: homepage:customize, settings:manage", or FEATURE_NOT_AVAILABLE (featureKey external_sections).—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
idpathyesstring—

Responses

StatusDescriptionBody
200Community deleted—
403Only Super Admins can delete communities—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
idpathyesstring—

Responses

StatusDescriptionBody
200Community details—
404Community not found—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
idpathyesstring—

Responses

StatusDescriptionBody
200Community updated—

Changes community status to ARCHIVED, hiding it from listings while preserving all data Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
idpathyesstringCommunity ID

Responses

StatusDescriptionBody
200Community archived successfully—
401Authentication required—
403Only Community Admins can archive their community—
404Community not found—

Changes community status from ARCHIVED back to ACTIVE, making it visible again Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
idpathyesstringCommunity ID

Responses

StatusDescriptionBody
200Community restored successfully—
401Authentication required—
403Only Community Admins can restore their community—
404Community not found—