On this page

المشاريع ٢ — a second, independent projects section: its own tables, permissions (projects2:*) and types. Same rules as Projects.

Two gates, two bodies (both 403): the community's page switch (settings.pageVisibility.projects2, off by default) → FEATURE_DISABLED; the plan lacks projects2 → FEATURE_NOT_AVAILABLE. Every route needs both.

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: projects2:manage, projects2:create or projects2:moderate;
  • edit / delete ANY project: projects2:manage, projects2:moderate or projects2:edit; the creator (createdBy) may always edit and delete their own. projects2:create alone does NOT edit other people's projects.
  • assignedOwnerId (hand a project to another member) needs projects2:manage or projects2: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}/projects2List projects
POST/api/communities/{communityId}/projects2Create a project
DELETE/api/communities/{communityId}/projects2/{id}Delete a project (owner, or projects2:manage / moderate / edit)
GET/api/communities/{communityId}/projects2/{id}Get one project
PUT/api/communities/{communityId}/projects2/{id}Edit a project (owner, or projects2: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: Project2WriteForm

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—