On this page

المشاريع — a community's project showcase with optional progress tracking.

Plan: every route needs the projects feature (403 FEATURE_NOT_AVAILABLE).

Who reads what (GET / and GET /{id} accept an optional token):

  • approved member → every project of the community;
  • guest or signed-in non-member → only projects with isGuestVisible: true, and only when the community exposes projects to guests; otherwise an empty page / 404. A token alone is not membership.
  • creator.email is removed for guests.

Who writes what:

  • create: projects:manage, projects:create or projects:moderate;
  • edit / delete ANY project: projects:manage, projects:moderate or projects:edit; the creator (createdBy) may always edit and delete their own. projects:create alone does NOT edit other people's projects.
  • assignedOwnerId (hand a project to another member) needs projects:manage or projects:moderate, and the target must be an APPROVED member of this community (403 PROJECT_OWNER_ASSIGN_FORBIDDEN / 400 PROJECT_OWNER_NOT_MEMBER).
  • create and edit are refused to members restricted from media or suspended (403 RESTRICTION_BLOCKED), and count against the storage quota.
  • communityId in the body is optional; if sent it must equal the path's (400 COMMUNITY_MISMATCH).

5 endpoints.

MethodPathSummary
GET/api/communities/{communityId}/projectsList projects
POST/api/communities/{communityId}/projectsCreate a project
DELETE/api/communities/{communityId}/projects/{id}Delete a project (owner, or projects:manage / moderate / edit)
GET/api/communities/{communityId}/projects/{id}Get one project
PUT/api/communities/{communityId}/projects/{id}Edit a project (owner, or projects:manage / moderate / edit)

Auth: optional — a token changes what you can see (see "Who may read what").

Parameters

NameInRequiredTypeDescription
communityIdpathyesstring (uuid)—
searchquerynostringMatches name
typeIdsquerynostringComma-separated or JSON array of project type ids
pagequerynointeger—
pageSizequerynointeger—

Responses

StatusDescriptionBody
200A page of projects the caller may see (empty for a non-member of a private community)object

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdpathyesstring (uuid)—

Request body (required) — multipart/form-data

Type: ProjectWriteForm

Responses

StatusDescriptionBody
201Created; data is the Project—
400Missing names/description/logo, invalid image, negative currentAmount, COMMUNITY_MISMATCH, PROJECT_OWNER_NOT_MEMBER—
403Missing permission, RESTRICTION_BLOCKED, PROJECT_OWNER_ASSIGN_FORBIDDEN, FEATURE_NOT_AVAILABLE, or storage quota exceeded—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdpathyesstring (uuid)—
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Deleted—
403Not the owner and no delete-any permission—
404Project not found—

Auth: optional — a token changes what you can see (see "Who may read what").

Parameters

NameInRequiredTypeDescription
communityIdpathyesstring (uuid)—
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200The project; data is a Project—
404Missing—

Send only the fields to change. removeLogo is refused unless a new projectLogo is uploaded; removeBanner=true clears the banner. assignedOwnerId="" gives the project back to the caller. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdpathyesstring (uuid)—
idpathyesstring (uuid)—

Request body — multipart/form-data

Type: object

Responses

StatusDescriptionBody
200Updated; data is the Project—
400Validation error, COMMUNITY_MISMATCH, PROJECT_OWNER_NOT_MEMBER—
403Not the owner and no edit-any permission, RESTRICTION_BLOCKED, PROJECT_OWNER_ASSIGN_FORBIDDEN, or storage quota exceeded—
404Project not found—